This component is a wrapper for the Rigidbody and Rigidbody2D components, containing not only the most commonly used properties and methods, but also some extra features.
More...
|
void | SetPositionAndRotation (Vector3 position, Quaternion rotation) |
| Sets the rigidbody position and rotation. More...
|
|
abstract void | Interpolate (Vector3 position) |
| Interpolates the rigidbody position (equivalent to MovePosition). More...
|
|
abstract void | Interpolate (Quaternion rotation) |
| Interpolates the rigidbody rotation (equivalent to MoveRotation). More...
|
|
void | Interpolate (Vector3 position, Quaternion rotation) |
| Interpolates the rigidbody position and rotation (equivalent to MovePosition and MoveRotation). More...
|
|
void | Move (Vector3 position) |
| Automatically moves the rigidbody based on its type. If the rigidbody is kinematic MovePosition will be used. If the rigidbody is dynamic the velocity will be set. More...
|
|
void | Rotate (Quaternion rotation) |
| Automatically rotates the rigidbody based on its type. If the rigidbody is kinematic MoveRotation will be used. If the rigidbody is dynamic the angular velocity will be set. More...
|
|
void | MoveAndRotate (Vector3 position, Quaternion rotation) |
| Uses both Move and Rotate method. More...
|
|
abstract Vector3 | GetPointVelocity (Vector3 point) |
| Gets the rigidbody velocity at a specific point in space. More...
|
|
abstract void | AddForceToRigidbody (Vector3 force, ForceMode forceMode=ForceMode.Force) |
|
abstract void | AddExplosionForceToRigidbody (float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier=0f) |
|
void | AddForce (Vector3 force, bool ignoreMass=false, bool useImpulse=false) |
| Adds a velocity vector to the rigidbody (simulating AddForce) calculated from a force value. More...
|
|
void | AddExplosionForce (float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier=0f) |
| Adds a velocity vector to the rigidbody (simulating AddExplosionForce) calculated from a force value. More...
|
|
void | AddTorque (Vector3 torque, bool ignoreMass=false) |
| Adds an angular velocity vector to the rigidbody (simulating AddTorque) calculated from a torque value. More...
|
|
|
void | OnBodyTypeChangeInternal () |
|
virtual void | Awake () |
|
|
bool | previousContinuousCollisionDetection = false |
|
|
abstract bool | Is2D [get] |
|
abstract float | Mass [get, set] |
|
abstract float | LinearDrag [get, set] |
|
abstract float | AngularDrag [get, set] |
|
abstract bool | IsKinematic [get, set] |
|
abstract bool | UseGravity [get, set] |
|
abstract bool | UseInterpolation [get, set] |
|
abstract bool | ContinuousCollisionDetection [get, set] |
|
abstract RigidbodyConstraints | Constraints [get, set] |
|
abstract bool | IsUsingContinuousCollisionDetection [get] |
|
Vector3 | Up [get] |
| Gets the current up direction based on the rigidbody rotation (not necessarily transform.up). More...
|
|
Vector3 | Forward [get] |
| Gets the current forward direction based on the rigidbody rotation (not necessarily transform.forward). More...
|
|
Vector3 | Right [get] |
| Gets the current up direction based on the rigidbody rotation (not necessarily transform.right) More...
|
|
abstract Vector3 | Position [get, set] |
| Gets the rigidbody position. More...
|
|
abstract Quaternion | Rotation [get, set] |
| Gets the rigidbody rotation. More...
|
|
abstract Vector3 | Velocity [get, set] |
| Gets the rigidbody linear velocity. More...
|
|
abstract Vector3 | AngularVelocity [get, set] |
| Gets the rigidbody angular velocity. More...
|
|
|
System.Action | OnBodyTypeChange |
|
This component is a wrapper for the Rigidbody and Rigidbody2D components, containing not only the most commonly used properties and methods, but also some extra features.
◆ AddExplosionForce()
void Lightbug.Utilities.RigidbodyComponent.AddExplosionForce |
( |
float |
explosionForce, |
|
|
Vector3 |
explosionPosition, |
|
|
float |
explosionRadius, |
|
|
float |
upwardsModifier = 0f |
|
) |
| |
|
inline |
Adds a velocity vector to the rigidbody (simulating AddExplosionForce) calculated from a force value.
◆ AddForce()
void Lightbug.Utilities.RigidbodyComponent.AddForce |
( |
Vector3 |
force, |
|
|
bool |
ignoreMass = false , |
|
|
bool |
useImpulse = false |
|
) |
| |
|
inline |
Adds a velocity vector to the rigidbody (simulating AddForce) calculated from a force value.
◆ AddTorque()
void Lightbug.Utilities.RigidbodyComponent.AddTorque |
( |
Vector3 |
torque, |
|
|
bool |
ignoreMass = false |
|
) |
| |
|
inline |
Adds an angular velocity vector to the rigidbody (simulating AddTorque) calculated from a torque value.
◆ GetPointVelocity()
abstract Vector3 Lightbug.Utilities.RigidbodyComponent.GetPointVelocity |
( |
Vector3 |
point | ) |
|
|
pure virtual |
◆ Interpolate() [1/3]
abstract void Lightbug.Utilities.RigidbodyComponent.Interpolate |
( |
Vector3 |
position | ) |
|
|
pure virtual |
◆ Interpolate() [2/3]
abstract void Lightbug.Utilities.RigidbodyComponent.Interpolate |
( |
Quaternion |
rotation | ) |
|
|
pure virtual |
◆ Interpolate() [3/3]
void Lightbug.Utilities.RigidbodyComponent.Interpolate |
( |
Vector3 |
position, |
|
|
Quaternion |
rotation |
|
) |
| |
|
inline |
Interpolates the rigidbody position and rotation (equivalent to MovePosition and MoveRotation).
- Parameters
-
position | the target position |
rotation | the target rotation |
◆ Move()
void Lightbug.Utilities.RigidbodyComponent.Move |
( |
Vector3 |
position | ) |
|
|
inline |
Automatically moves the rigidbody based on its type. If the rigidbody is kinematic MovePosition will be used. If the rigidbody is dynamic the velocity will be set.
- Parameters
-
position | the target position |
◆ MoveAndRotate()
void Lightbug.Utilities.RigidbodyComponent.MoveAndRotate |
( |
Vector3 |
position, |
|
|
Quaternion |
rotation |
|
) |
| |
|
inline |
Uses both Move and Rotate method.
◆ Rotate()
void Lightbug.Utilities.RigidbodyComponent.Rotate |
( |
Quaternion |
rotation | ) |
|
|
inline |
Automatically rotates the rigidbody based on its type. If the rigidbody is kinematic MoveRotation will be used. If the rigidbody is dynamic the angular velocity will be set.
- Parameters
-
rotation | the target rotation |
◆ SetPositionAndRotation()
void Lightbug.Utilities.RigidbodyComponent.SetPositionAndRotation |
( |
Vector3 |
position, |
|
|
Quaternion |
rotation |
|
) |
| |
|
inline |
Sets the rigidbody position and rotation.
◆ AngularVelocity
abstract Vector3 Lightbug.Utilities.RigidbodyComponent.AngularVelocity |
|
getset |
Gets the rigidbody angular velocity.
◆ Forward
Vector3 Lightbug.Utilities.RigidbodyComponent.Forward |
|
get |
Gets the current forward direction based on the rigidbody rotation (not necessarily transform.forward).
◆ Position
abstract Vector3 Lightbug.Utilities.RigidbodyComponent.Position |
|
getset |
Gets the rigidbody position.
◆ Right
Vector3 Lightbug.Utilities.RigidbodyComponent.Right |
|
get |
Gets the current up direction based on the rigidbody rotation (not necessarily transform.right)
◆ Rotation
abstract Quaternion Lightbug.Utilities.RigidbodyComponent.Rotation |
|
getset |
Gets the rigidbody rotation.
◆ Up
Vector3 Lightbug.Utilities.RigidbodyComponent.Up |
|
get |
Gets the current up direction based on the rigidbody rotation (not necessarily transform.up).
◆ Velocity
abstract Vector3 Lightbug.Utilities.RigidbodyComponent.Velocity |
|
getset |
Gets the rigidbody linear velocity.
The documentation for this class was generated from the following file:
- C:/Unity/Projects/character-controller-pro/Assets/Character Controller Pro/Utilities/Scripts/RigidbodyComponent.cs