KS.Reactor.Client.Unity.ksBaseUnityRigidBody Class Reference

Base class for classes that wrap a Unity Rigidbody for use with Reactor. More...

Inheritance diagram for KS.Reactor.Client.Unity.ksBaseUnityRigidBody:
KS.Reactor.Client.Unity.ksUnityRigidBody KS.Reactor.Client.Unity.ksUnityRigidBody2DView

Public Member Functions

 ksBaseUnityRigidBody (Rigidbody rigidBody, bool forceKinematic)
 Constructor More...
 

Protected Attributes

Rigidbody m_rigidBody
 

Properties

static ksRigidBodyModes DefaultType [get, set]
 Determines if rigid bodies are 3D or 2D by default when spawning prefabs or loading the scene. More...
 
Rigidbody Rigidbody [get]
 The wrapped rigid body. More...
 
bool ForceKinematic [get, set]
 If true, the Rigidbody.isKinematic will be set to true regardless of the value of IsKinematic to prevent Unity physics from affecting the rigid body. More...
 
float Mass [get, set]
 Mass of the rigid body. More...
 
float Drag [get, set]
 Damping. More...
 
float AngularDrag [get, set]
 Angular damping. More...
 
bool UseGravity [get, set]
 If true, the entity will be affected by the scene gravity. More...
 
bool? IsKinematic [get, set]
 If true, the entity will not be effected by gravity or other impulses, but may be moved around by setting translation and rotation from scripts. More...
 
ksVector3 CenterOfMass [get, set]
 The rigidbody's center of mass in local space. More...
 

Detailed Description

Base class for classes that wrap a Unity Rigidbody for use with Reactor.

Constructor & Destructor Documentation

◆ ksBaseUnityRigidBody()

KS.Reactor.Client.Unity.ksBaseUnityRigidBody.ksBaseUnityRigidBody ( Rigidbody  rigidBody,
bool  forceKinematic 
)

Constructor

Parameters
rigidBodyUnity rigid body.
forceKinematicIf true, sets the Unity rigidbody to kinematic so Unity physics doesn't try to move the object.

Property Documentation

◆ AngularDrag

float KS.Reactor.Client.Unity.ksBaseUnityRigidBody.AngularDrag
getset

Angular damping.

◆ CenterOfMass

ksVector3 KS.Reactor.Client.Unity.ksBaseUnityRigidBody.CenterOfMass
getset

The rigidbody's center of mass in local space.

◆ DefaultType

ksRigidBodyModes KS.Reactor.Client.Unity.ksBaseUnityRigidBody.DefaultType
staticgetset

Determines if rigid bodies are 3D or 2D by default when spawning prefabs or loading the scene.

◆ Drag

float KS.Reactor.Client.Unity.ksBaseUnityRigidBody.Drag
getset

Damping.

◆ ForceKinematic

bool KS.Reactor.Client.Unity.ksBaseUnityRigidBody.ForceKinematic
getset

If true, the Rigidbody.isKinematic will be set to true regardless of the value of IsKinematic to prevent Unity physics from affecting the rigid body.

Setting to false will set the Rigidbody.isKinematic back to the IsKinematic value.

◆ IsKinematic

bool? KS.Reactor.Client.Unity.ksBaseUnityRigidBody.IsKinematic
getset

If true, the entity will not be effected by gravity or other impulses, but may be moved around by setting translation and rotation from scripts.

When ForceKinematic is true, this value is different from Rigidbody.isKinematic, which is set to true to prevent Unity physics from affecting the rigid body.

◆ Mass

float KS.Reactor.Client.Unity.ksBaseUnityRigidBody.Mass
getset

Mass of the rigid body.

◆ Rigidbody

Rigidbody KS.Reactor.Client.Unity.ksBaseUnityRigidBody.Rigidbody
get

The wrapped rigid body.

◆ UseGravity

bool KS.Reactor.Client.Unity.ksBaseUnityRigidBody.UseGravity
getset

If true, the entity will be affected by the scene gravity.