Photon Fusion
2.1.1
Implementation for handling 2D Rigidbodies. More...
Inherits AbstractPhysicsBody.
Public Member Functions | |
| override void | AddForce (Vector3 force) |
| override void | AddTorque (Vector3 torque) |
| PhysicsBody2D (Rigidbody2D rb) | |
| Construct from Rigidbody2D. | |
| Public Member Functions inherited from AbstractPhysicsBody | |
| void | AddForce (Vector3 force) |
| Method to apply force on the rigidbody. | |
| void | AddTorque (Vector3 torque) |
| Method to apply torque on the rigidbody. For 2D the Z axis is used. | |
Properties | |
| override float | AngularDrag [get, set] |
| override Vector3 | AngularVelocity [get, set] |
| override Component | Component [get] |
| override float | Drag [get, set] |
| override int | EncodedConstraints [get, set] |
| override NetworkRigidbodyFlags | Flags [get] |
| override Vector3 | Gravity [get] |
| float | Inertia2D [get, set] |
| 2D physics Inertia. | |
| override Vector3 | InertiaTensor [get, set] |
| override BodyInterpolation | Interpolation [get, set] |
| override bool | Kinematic [get, set] |
| override Vector3 | LinearVelocity [get, set] |
| override float | Mass [get, set] |
| override Vector3 | Position [get, set] |
| Rigidbody2D | Rigidbody2D [get] |
| The underlying body, for direct access, if required. | |
| override Quaternion | Rotation [get, set] |
| override bool | Sleeping [get, set] |
| override Transform | Transform [get] |
| override bool | Valid [get] |
| Properties inherited from AbstractPhysicsBody | |
| float | AngularDrag [get, set] |
| Coefficient of angular drag. | |
| Vector3 | AngularVelocity [get, set] |
| Angular velocity of the rigidbody. | |
| Component | Component [get] |
| The Component component of the rigidbody. | |
| float | Drag [get, set] |
| Coefficient of drag. | |
| int | EncodedConstraints [get, set] |
| Rigidbody constraints encoded into an int32 field. | |
| NetworkRigidbodyFlags | Flags [get] |
| Networked flags representing a 2D or 3D rigid body state and characteristics. | |
| Vector3 | Gravity [get] |
| Gravity value from the respective 2D or 3D project physics settings. | |
| Vector3 | InertiaTensor [get, set] |
| The Inertia tensor of the physics body. For 2D the Z axis is used. | |
| BodyInterpolation | Interpolation [get, set] |
| The interpolation setting of the physics body. | |
| bool | Kinematic [get, set] |
| Define if the rigidbody is kinematic. | |
| Vector3 | LinearVelocity [get, set] |
| Linear velocity of the rigidbody. | |
| float | Mass [get, set] |
| Mass of the Rigidbody. | |
| Vector3 | Position [get, set] |
| Rigidbody position. | |
| Quaternion | Rotation [get, set] |
| Rigidbody rotation. | |
| bool | Sleeping [get, set] |
| Define if the rigidbody is sleeping. | |
| Transform | Transform [get] |
| The Transform component of the rigidbody. | |
| bool | Valid [get] |
| True if this AbstractPhysicsBody has a valid rigidbody reference. | |
Additional Inherited Members | |
| Public Types inherited from AbstractPhysicsBody | |
| enum | BodyInterpolation |
| Abstraction to handle interpolation settings from both 2D and 3D bodies. Values are Asserted to be correct in the constructors of the appropriate concrete class. More... | |
| Public Attributes inherited from AbstractPhysicsBody | |
| bool | WasColliding |
| Indicate if the rigidbody was colliding on the previous physics step. | |
Implementation for handling 2D Rigidbodies.