Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Public Member Functions | |
void | AddExplosionForce (float explosionForce, SVector explosionPosition, float explosionRadius, float upwardsModifier) |
Applies a force to a rigidbody that simulates explosion effects. Other rigid bodies will be affected by the explosion within its radius - the closer they are to the explosionPosition, the stronger the force will be exerted on them. More... | |
void | AddForce (SVector force) |
Adds a force to the Rigidbody that is continuously exerted on it in the given direction. More... | |
void | AddForceAtPosition (SVector force, SVector position) |
Adds a force to the Rigidbody at a given position (should be within the range of the rigidbody for a realistic result). Thus, both a torque and force are applied to the object. More... | |
void | AddRelativeTorque (SVector torque) |
Adds a torque to the rigidbody relative to the local coordinate system. More... | |
void | AddTorque (SVector torque) |
Adds a torque to the rigidbody relative to the global coordinate system. More... | |
SVector | ClosestPointOnBounds (SVector input) |
Returns the closest point on the bounding box of the attached colliders. More... | |
SVector | GetPointVelocity (SVector worldPoint) |
The velocity of the rigidbody at the point worldPoint in global space. More... | |
SVector | GetRelativePointVelocity (SVector point) |
The velocity relative to the rigidbody at the point relativePoint. More... | |
void | MovePosition (SVector point) |
Moves the rigidbody to position. More... | |
void | MoveRotation (SQuaternion rotation) |
Rotates the rigidbody to rotation. More... | |
void | ResetCenterOfMass () |
Reset the center of mass of the rigidbody. More... | |
void | ResetInertiaTensor () |
Reset the inertia tensor value and rotation. More... | |
void | Sleep () |
Forces a rigidbody to sleep. More... | |
void | WakeUp () |
Forces a rigidbody to wake up. More... | |
SPhysicsHit[] | SweepTestAll (SVector direction, float distance) |
Like Rigidbody.SweepTest, but returns all hits. More... | |
Properties | |
float | AngularDrag [get, set] |
The angular drag of the object. More... | |
SVector | AngularVelocity [get, set] |
The angular velocity vector of the rigidbody (in radians per second). More... | |
SVector | CenterOfMass [get, set] |
The center of mass relative to the local origin. More... | |
float | Drag [get, set] |
The drag of the object. More... | |
bool | FreezeRotation [get, set] |
Controls whether physics will have any impact on the rotation of the object. More... | |
bool | Kinematic [get, set] |
Controls whether physics will have any impact on the object. More... | |
float | Mass [get, set] |
The mass of the rigidbody. More... | |
float | MaxAngularVelocity [get, set] |
The maximum angular velocity of the rigidbody (7 by default). Can be useful to prevent an object from spinning uncontrollably fast. More... | |
float | MaxDepenetrationVelocity [get, set] |
The maximum depenetration velocity of the rigidbody (1.00000003318135E+32 by default). Can be useful to make colliding objects bounce away in a smoother fashion. More... | |
bool | UseGravity [get, set] |
Controls whether gravity affects the rigidbody. More... | |
SVector | Velocity [get, set] |
The velocity vector of the rigidbody. (in units per second). More... | |
SVector | WorldCenterOfMass [get] |
The center of mass of the rigidbody relative to the global origin (Read Only). More... | |
bool | Sleeping [get] |
Is the rigidbody sleeping? More... | |
float | Density [set] |
The density of the object (1 by default). Changing this value will affect the mass of t he object (the volume will remain unchanged). More... | |
SVector | InertiaTensor [get, set] |
The diagonal inertia tensor of mass relative to the center of mass. It is defined in x,y,z axis. It is calculate by physics automatically,and if you set value to it, it would override the value. More... | |
SQuaternion | InertiaTensorRotation [get, set] |
The rotation of the inertia tensor. More... | |
Properties inherited from ScriptClassComponent< Rigidbody > | |
SGameObject | GameObject [get] |
Return the GameObject which component added. More... | |
void SineSpace.Scripting.Components.SRigidbody.AddExplosionForce | ( | float | explosionForce, |
SVector | explosionPosition, | ||
float | explosionRadius, | ||
float | upwardsModifier | ||
) |
Applies a force to a rigidbody that simulates explosion effects. Other rigid bodies will be affected by the explosion within its radius - the closer they are to the explosionPosition, the stronger the force will be exerted on them.
void SineSpace.Scripting.Components.SRigidbody.AddForce | ( | SVector | force | ) |
Adds a force to the Rigidbody that is continuously exerted on it in the given direction.
void SineSpace.Scripting.Components.SRigidbody.AddForceAtPosition | ( | SVector | force, |
SVector | position | ||
) |
Adds a force to the Rigidbody at a given position (should be within the range of the rigidbody for a realistic result). Thus, both a torque and force are applied to the object.
void SineSpace.Scripting.Components.SRigidbody.AddRelativeTorque | ( | SVector | torque | ) |
Adds a torque to the rigidbody relative to the local coordinate system.
void SineSpace.Scripting.Components.SRigidbody.AddTorque | ( | SVector | torque | ) |
Adds a torque to the rigidbody relative to the global coordinate system.
Returns the closest point on the bounding box of the attached colliders.
The velocity of the rigidbody at the point worldPoint in global space.
The velocity relative to the rigidbody at the point relativePoint.
void SineSpace.Scripting.Components.SRigidbody.MovePosition | ( | SVector | point | ) |
Moves the rigidbody to position.
void SineSpace.Scripting.Components.SRigidbody.MoveRotation | ( | SQuaternion | rotation | ) |
Rotates the rigidbody to rotation.
void SineSpace.Scripting.Components.SRigidbody.ResetCenterOfMass | ( | ) |
Reset the center of mass of the rigidbody.
void SineSpace.Scripting.Components.SRigidbody.ResetInertiaTensor | ( | ) |
Reset the inertia tensor value and rotation.
void SineSpace.Scripting.Components.SRigidbody.Sleep | ( | ) |
Forces a rigidbody to sleep.
SPhysicsHit [] SineSpace.Scripting.Components.SRigidbody.SweepTestAll | ( | SVector | direction, |
float | distance | ||
) |
Like Rigidbody.SweepTest, but returns all hits.
void SineSpace.Scripting.Components.SRigidbody.WakeUp | ( | ) |
Forces a rigidbody to wake up.
|
getset |
The angular drag of the object.
|
getset |
The angular velocity vector of the rigidbody (in radians per second).
|
getset |
The center of mass relative to the local origin.
|
set |
The density of the object (1 by default). Changing this value will affect the mass of t he object (the volume will remain unchanged).
|
getset |
The drag of the object.
|
getset |
Controls whether physics will have any impact on the rotation of the object.
|
getset |
The diagonal inertia tensor of mass relative to the center of mass. It is defined in x,y,z axis. It is calculate by physics automatically,and if you set value to it, it would override the value.
|
getset |
The rotation of the inertia tensor.
|
getset |
Controls whether physics will have any impact on the object.
|
getset |
The mass of the rigidbody.
|
getset |
The maximum angular velocity of the rigidbody (7 by default). Can be useful to prevent an object from spinning uncontrollably fast.
|
getset |
The maximum depenetration velocity of the rigidbody (1.00000003318135E+32 by default). Can be useful to make colliding objects bounce away in a smoother fashion.
|
get |
Is the rigidbody sleeping?
|
getset |
Controls whether gravity affects the rigidbody.
|
getset |
The velocity vector of the rigidbody. (in units per second).
|
get |
The center of mass of the rigidbody relative to the global origin (Read Only).