Character Controller Pro 1.4.11
A 2D/3D character controller asset for Unity.
Lightbug.Utilities.RigidbodyComponent2D Class Reference

An implementation of RigidbodyComponent for 2D rigidbodies. More...

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

Public Member Functions

override HitInfo Sweep (Vector3 position, Vector3 direction, float distance)
 
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
abstract HitInfo Sweep (Vector3 position, Vector3 direction, float distance)
 
void SetPositionAndRotation (Vector3 position, Quaternion rotation)
 Sets the rigidbody position and rotation.
 
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.
 
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.
 
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.
 
void AddTorque (Vector3 torque, bool ignoreMass=false)
 Adds an angular velocity vector to the rigidbody (simulating AddTorque) calculated from a torque value.
 

Protected Member Functions

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

Properties

override bool IsUsingContinuousCollisionDetection [get]
 
override bool Is2D [get]
 
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]
 
abstract Vector3 Position [get, set]
 Gets the rigidbody position.
 
abstract Quaternion Rotation [get, set]
 Gets the rigidbody rotation.
 
abstract Vector3 Velocity [get, set]
 Gets the rigidbody linear velocity.
 
abstract Vector3 AngularVelocity [get, set]
 Gets the rigidbody angular velocity.
 

Additional Inherited Members

- Static Public Member Functions inherited from Lightbug.Utilities.RigidbodyComponent
static RigidbodyComponent CreateInstance (GameObject gameObject)
 
- Protected Attributes inherited from Lightbug.Utilities.RigidbodyComponent
bool previousContinuousCollisionDetection = false
 
- Events inherited from Lightbug.Utilities.RigidbodyComponent
System.Action OnBodyTypeChange
 

Detailed Description

An implementation of RigidbodyComponent for 2D rigidbodies.

Member Function Documentation

◆ AddExplosionForceToRigidbody()

override void Lightbug.Utilities.RigidbodyComponent2D.AddExplosionForceToRigidbody ( float  explosionForce,
Vector3  explosionPosition,
float  explosionRadius,
float  upwardsModifier = 0 
)
virtual

◆ AddForceToRigidbody()

override void Lightbug.Utilities.RigidbodyComponent2D.AddForceToRigidbody ( Vector3  force,
ForceMode  forceMode = ForceMode.Force 
)
inlinevirtual

◆ Awake()

override void Lightbug.Utilities.RigidbodyComponent2D.Awake ( )
inlineprotectedvirtual

◆ GetPointVelocity()

override Vector3 Lightbug.Utilities.RigidbodyComponent2D.GetPointVelocity ( Vector3  point)
virtual

Gets the rigidbody velocity at a specific point in space.

Implements Lightbug.Utilities.RigidbodyComponent.

◆ Interpolate() [1/2]

override void Lightbug.Utilities.RigidbodyComponent2D.Interpolate ( Quaternion  rotation)
virtual

Interpolates the rigidbody rotation (equivalent to MoveRotation).

Implements Lightbug.Utilities.RigidbodyComponent.

◆ Interpolate() [2/2]

override void Lightbug.Utilities.RigidbodyComponent2D.Interpolate ( Vector3  position)
virtual

Interpolates the rigidbody position (equivalent to MovePosition).

Implements Lightbug.Utilities.RigidbodyComponent.

◆ Sweep()

override HitInfo Lightbug.Utilities.RigidbodyComponent2D.Sweep ( Vector3  position,
Vector3  direction,
float  distance 
)
inlinevirtual

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