2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
23 INTERNAL_get_position(out
Vector3 value);
28 INTERNAL_set_position(ref value);
44 INTERNAL_set_rotation(ref value);
56 INTERNAL_get_linear_velocity(out
Vector3 value);
61 INTERNAL_set_linear_velocity(ref value);
72 INTERNAL_get_angular_velocity(out
Vector3 value);
77 INTERNAL_set_angular_velocity(ref value);
85 public float friction { [MethodImpl(MethodImplOptions.InternalCall)]
get; [MethodImpl(MethodImplOptions.InternalCall)]
set; }
92 public float bounciness { [MethodImpl(MethodImplOptions.InternalCall)]
get; [MethodImpl(MethodImplOptions.InternalCall)]
set; }
97 public float linearDamping { [MethodImpl(MethodImplOptions.InternalCall)]
get; [MethodImpl(MethodImplOptions.InternalCall)]
set; }
102 public float angularDamping { [MethodImpl(MethodImplOptions.InternalCall)]
get; [MethodImpl(MethodImplOptions.InternalCall)]
set; }
111 return INTERNAL_get_is_kinematic();
115 INTERNAL_set_is_kinematic(value);
122 public bool isStatic { [MethodImpl(MethodImplOptions.InternalCall)]
get; [MethodImpl(MethodImplOptions.InternalCall)]
set; }
129 public bool isTrigger { [MethodImpl(MethodImplOptions.InternalCall)]
get; }
138 return INTERNAL_get_mass();
142 INTERNAL_set_mass(value);
162 INTERNAL_add_force(ref force, ref rel_pos);
171 INTERNAL_add_torque(ref torque);
180 [MethodImpl(MethodImplOptions.InternalCall)]
189 [MethodImpl(MethodImplOptions.InternalCall)]
194 [MethodImpl(MethodImplOptions.InternalCall)]
195 private extern void INTERNAL_get_position(out
Vector3 value);
197 [MethodImpl(MethodImplOptions.InternalCall)]
198 private extern void INTERNAL_set_position(ref
Vector3 value);
200 [MethodImpl(MethodImplOptions.InternalCall)]
201 private extern void INTERNAL_get_rotation(out
Quaternion value);
203 [MethodImpl(MethodImplOptions.InternalCall)]
204 private extern void INTERNAL_set_rotation(ref
Quaternion value);
206 [MethodImpl(MethodImplOptions.InternalCall)]
207 private extern void INTERNAL_get_linear_velocity(out
Vector3 value);
209 [MethodImpl(MethodImplOptions.InternalCall)]
210 private extern void INTERNAL_set_linear_velocity(ref
Vector3 value);
212 [MethodImpl(MethodImplOptions.InternalCall)]
213 private extern void INTERNAL_get_angular_velocity(out
Vector3 value);
215 [MethodImpl(MethodImplOptions.InternalCall)]
216 private extern void INTERNAL_set_angular_velocity(ref
Vector3 value);
218 [MethodImpl(MethodImplOptions.InternalCall)]
219 private extern void INTERNAL_add_force(ref
Vector3 force, ref
Vector3 rel_pos);
221 [MethodImpl(MethodImplOptions.InternalCall)]
222 private extern void INTERNAL_add_torque(ref
Vector3 torque);
224 [MethodImpl(MethodImplOptions.InternalCall)]
225 private extern bool INTERNAL_get_is_kinematic();
227 [MethodImpl(MethodImplOptions.InternalCall)]
228 private extern void INTERNAL_set_is_kinematic(
bool value);
230 [MethodImpl(MethodImplOptions.InternalCall)]
231 private extern float INTERNAL_get_mass();
233 [MethodImpl(MethodImplOptions.InternalCall)]
234 private extern void INTERNAL_set_mass(
float value);
float bounciness
How bouncy is the surface? A value of 0 will not bounce A value of 1 will bounce without any loss of ...
void SetFreezeRotation(bool freezeX, bool freezeY, bool freezeZ)
Controls whether physics will change the rotation of the object
bool isKinematic
Controls whether physics affects the rigidbody
Vector3 angularVelocity
The angular velocity vector of the rigidbody measured in radians per second
float angularDamping
The angular drag of the object
void AddTorque(Vector3 torque)
Adds a torque to the rigidbody
Quaternion rotation
The rotation of the rigidbody
bool isStatic
Static objects behave like a wall or a floor which can only affect the other objects and not moving
float linearDamping
The drag of the object
float friction
The friction of an object Usually a value from 0 to 1. A value of zero feels like ice,...
void SetFreezePosition(bool freezeX, bool freezeY, bool freezeZ)
Controls whether physics will change the position of the object
void AddForce(Vector3 force, Vector3 rel_pos)
Adds a force to the rigidbody relative to its coordinate system
float mass
The mass of the rigidbody
bool isTrigger
Is the collider a trigger? A trigger doesn't register a collision with an incoming rigidbody Instead,...
Vector3 linearVelocity
The velocity vector of the rigidbody It represents the rate of change of rigidbody position
Vector3 position
The position of the rigidbody
void AddForce(Vector3 force)
Adds a force to the rigidbody