Character Controller Pro  1.3.8
A 2D/3D character controller asset for the Unity Engine.
Lightbug.Utilities.RigidbodyComponent3D Class Reference

An implementation of a RigidbodyComponent for 3D rigidbodies. More...

Inheritance diagram for Lightbug.Utilities.RigidbodyComponent3D:
Lightbug.Utilities.RigidbodyComponent

Public Member Functions

override void Interpolate (Vector3 position)
 Interpolates the rigidbody position (equivalent to MovePosition). More...
 
override void Interpolate (Quaternion rotation)
 Interpolates the rigidbody rotation (equivalent to MoveRotation). More...
 
override Vector3 GetPointVelocity (Vector3 point)
 Gets the rigidbody velocity at a specific point in space. More...
 
override void AddForceToRigidbody (Vector3 force, ForceMode forceMode=ForceMode.Force)
 
override void AddExplosionForceToRigidbody (float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier=0)
 
- Public Member Functions inherited from Lightbug.Utilities.RigidbodyComponent
void SetPositionAndRotation (Vector3 position, Quaternion rotation)
 Sets the rigidbody position and rotation. 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...
 
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...
 

Public Attributes

override bool Is2D => false
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from Lightbug.Utilities.RigidbodyComponent
void OnBodyTypeChangeInternal ()
 

Protected Attributes

override bool IsUsingContinuousCollisionDetection => rigidbody.collisionDetectionMode > 0
 
- Protected Attributes inherited from Lightbug.Utilities.RigidbodyComponent
bool previousContinuousCollisionDetection = false
 

Properties

override float Mass [get, set]
 
override float LinearDrag [get, set]
 
override float AngularDrag [get, set]
 
override bool IsKinematic [get, set]
 
override bool UseGravity [get, set]
 
override bool? UseInterpolation [get, set]
 
override bool? ContinuousCollisionDetection [get, set]
 
override RigidbodyConstraints Constraints [get, set]
 
override Vector3 Position [get, set]
 
override Quaternion Rotation [get, set]
 
override Vector3 Velocity [get, set]
 
override Vector3 AngularVelocity [get, set]
 
- Properties inherited from Lightbug.Utilities.RigidbodyComponent
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from Lightbug.Utilities.RigidbodyComponent
static RigidbodyComponent CreateInstance (GameObject gameObject)
 
- Events inherited from Lightbug.Utilities.RigidbodyComponent
System.Action OnBodyTypeChange
 

Detailed Description

An implementation of a RigidbodyComponent for 3D rigidbodies.

Member Function Documentation

◆ GetPointVelocity()

override Vector3 Lightbug.Utilities.RigidbodyComponent3D.GetPointVelocity ( Vector3  point)
inlinevirtual

Gets the rigidbody velocity at a specific point in space.

Implements Lightbug.Utilities.RigidbodyComponent.

◆ Interpolate() [1/2]

override void Lightbug.Utilities.RigidbodyComponent3D.Interpolate ( Vector3  position)
inlinevirtual

Interpolates the rigidbody position (equivalent to MovePosition).

Implements Lightbug.Utilities.RigidbodyComponent.

◆ Interpolate() [2/2]

override void Lightbug.Utilities.RigidbodyComponent3D.Interpolate ( Quaternion  rotation)
inlinevirtual

Interpolates the rigidbody rotation (equivalent to MoveRotation).

Implements Lightbug.Utilities.RigidbodyComponent.


The documentation for this class was generated from the following file: