Class Rigidbody
- Namespace
- BasilEngine.Components
- Assembly
- BasilEngine.dll
[NativeHeader("Bindings/ManagedPhysics.hpp")]
[NativeClass("ManagedPhysics", ".")]
public class Rigidbody : Component
- Inheritance
-
Rigidbody
- Inherited Members
Properties
AngularDrag
Angular drag coefficient.
public float AngularDrag { get; set; }
Property Value
AngularVelocity
Angular velocity of the rigidbody.
public Vector3 AngularVelocity { get; set; }
Property Value
Drag
Linear drag coefficient.
public float Drag { get; set; }
Property Value
FreezeRotX
Locks rotation around the X axis.
public bool FreezeRotX { get; set; }
Property Value
FreezeRotY
Locks rotation around the Y axis.
public bool FreezeRotY { get; set; }
Property Value
FreezeRotZ
Locks rotation around the Z axis.
public bool FreezeRotZ { get; set; }
Property Value
FreezeX
Locks translation on the X axis.
public bool FreezeX { get; set; }
Property Value
FreezeY
Locks translation on the Y axis.
public bool FreezeY { get; set; }
Property Value
FreezeZ
Locks translation on the Z axis.
public bool FreezeZ { get; set; }
Property Value
Friction
Surface friction coefficient.
public float Friction { get; set; }
Property Value
Gravity
Gravity multiplier applied to this body.
public float Gravity { get; set; }
Property Value
IsKinematic
Whether the body is kinematic.
public bool IsKinematic { get; set; }
Property Value
LinearDamping
Linear damping applied each update.
public float LinearDamping { get; set; }
Property Value
Mass
Mass of the rigidbody.
public float Mass { get; set; }
Property Value
UseGravity
Whether gravity affects the body.
public bool UseGravity { get; set; }
Property Value
motionType
Gets or sets the motion type.
public Rigidbody.MotionType motionType { get; set; }
Property Value
velocity
Linear velocity of the rigidbody.
public Vector3 velocity { get; set; }
Property Value
Methods
AddForce(Vector3, ForceMode)
Applies a force to the rigidbody.
public void AddForce(Vector3 force, ForceMode mode)
Parameters
AddForceInternal(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void AddForceInternal(ulong handle, float x, float y, float z)
Parameters
AddImpulseInternal(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void AddImpulseInternal(ulong handle, float x, float y, float z)
Parameters
GetAngularDrag(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetAngularDrag(ulong handle)
Parameters
handleulong
Returns
GetAngularVelocity(ulong, out float, out float, out float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void GetAngularVelocity(ulong handle, out float x, out float y, out float z)
Parameters
GetCenterOfMass(ulong, out float, out float, out float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void GetCenterOfMass(ulong handle, out float x, out float y, out float z)
Parameters
GetDrag(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetDrag(ulong handle)
Parameters
handleulong
Returns
GetFreezeRotationX(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeRotationX(ulong handle)
Parameters
handleulong
Returns
GetFreezeRotationY(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeRotationY(ulong handle)
Parameters
handleulong
Returns
GetFreezeRotationZ(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeRotationZ(ulong handle)
Parameters
handleulong
Returns
GetFreezeX(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeX(ulong handle)
Parameters
handleulong
Returns
GetFreezeY(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeY(ulong handle)
Parameters
handleulong
Returns
GetFreezeZ(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetFreezeZ(ulong handle)
Parameters
handleulong
Returns
GetFriction(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetFriction(ulong handle)
Parameters
handleulong
Returns
GetGravityFactor(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetGravityFactor(ulong handle)
Parameters
handleulong
Returns
GetIsKinematic(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetIsKinematic(ulong handle)
Parameters
handleulong
Returns
GetLinearDamping(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetLinearDamping(ulong handle)
Parameters
handleulong
Returns
GetLinearVelocity(ulong, out float, out float, out float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void GetLinearVelocity(ulong handle, out float x, out float y, out float z)
Parameters
GetMass(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern float GetMass(ulong handle)
Parameters
handleulong
Returns
GetMotionType(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern int GetMotionType(ulong handle)
Parameters
handleulong
Returns
GetUseGravity(ulong)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern bool GetUseGravity(ulong handle)
Parameters
handleulong
Returns
MovePosition(Vector3)
Moves the rigidbody to a position using interpolation.
public void MovePosition(Vector3 position)
Parameters
positionVector3Target world position.
MovePositionInternal(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
[NativeMethod("MovePosition")]
public static extern void MovePositionInternal(ulong handle, float x, float y, float z)
Parameters
SetAngularDrag(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetAngularDrag(ulong handle, float angularDrag)
Parameters
SetAngularVelocity(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetAngularVelocity(ulong handle, float x, float y, float z)
Parameters
SetCenterOfMass(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetCenterOfMass(ulong handle, float x, float y, float z)
Parameters
SetDrag(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetDrag(ulong handle, float drag)
Parameters
SetFreezeRotationX(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeRotationX(ulong handle, bool freezeRotationX)
Parameters
SetFreezeRotationY(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeRotationY(ulong handle, bool freezeRotationY)
Parameters
SetFreezeRotationZ(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeRotationZ(ulong handle, bool freezeRotationZ)
Parameters
SetFreezeX(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeX(ulong handle, bool freezeX)
Parameters
SetFreezeY(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeY(ulong handle, bool freezeY)
Parameters
SetFreezeZ(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFreezeZ(ulong handle, bool freezeZ)
Parameters
SetFriction(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetFriction(ulong handle, float friction)
Parameters
SetGravityFactor(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetGravityFactor(ulong handle, float useAutoGravity)
Parameters
SetIsKinematic(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetIsKinematic(ulong handle, bool isKinematic)
Parameters
SetLinearDamping(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetLinearDamping(ulong handle, float linearDamping)
Parameters
SetLinearVelocity(ulong, float, float, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetLinearVelocity(ulong handle, float x, float y, float z)
Parameters
SetMass(ulong, float)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetMass(ulong handle, float mass)
Parameters
SetMotionType(ulong, int)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetMotionType(ulong handle, int motionType)
Parameters
SetUseGravity(ulong, bool)
[StaticAccessor("ManagedPhysics", StaticAccessorType.DoubleColon)]
public static extern void SetUseGravity(ulong handle, bool useGravity)