Rigidbody
Complete API reference for Rigidbody, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Physics
Component: no
public class Rigidbody extends PhysicsComponent
Constructors
| Signature | Description |
|---|---|
Rigidbody(Rigidbody) | Executes Rigidbody and returns after the underlying engine call finishes. |
Rigidbody() | Executes Rigidbody and returns after the underlying engine call finishes. |
Attributes
| Name | Type | Description |
|---|---|---|
instance | Rigidbody | Represents the instance value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|---|---|---|
angularDamping | float | get/set | Returns the angular damping of the Rigidbody. |
angularVelocity | Vector3 | get/set | Returns the current angular velocity of the Rigidbody. |
bounciness | float | get/set | Returns the bounciness of the Rigidbody. |
freezePX | boolean | get/set | Returns whether movement on the X axis is frozen. |
freezePY | boolean | get/set | Returns whether movement on the Y axis is frozen. |
freezePZ | boolean | get/set | Returns whether movement on the Z axis is frozen. |
freezeRX | boolean | get/set | Returns whether rotation on the X axis is frozen. |
freezeRY | boolean | get/set | Returns whether rotation on the Y axis is frozen. |
freezeRZ | boolean | get/set | Returns whether rotation on the Z axis is frozen. |
friction | float | get/set | Returns the friction of the Rigidbody. |
gravityEnabled | boolean | get/set | Checks whether gravity is enabled for the Rigidbody. |
gravityMultiplier | Vector3 | get/set | Returns the gravity multiplier of the Rigidbody. |
linearDamping | float | get/set | Returns the linear damping of the Rigidbody. |
mass | float | get/set | Returns the mass of the Rigidbody. |
physicsLayer | PhysicsLayer | get/set | Returns the PhysicsLayer of the Rigidbody. |
velocity | Vector3 | get/set | Returns the current velocity of the Rigidbody. |
Methods
| Signature | Returns | Description |
|---|---|---|
addForce(Vector3) | void | Applies a force to the Rigidbody in the specified direction. |
addForce(float, float, float) | void | Applies a force to the Rigidbody with the specified x, y and z values. |
addForce(Vector3, Vector3) | void | Applies a force to the Rigidbody at a specific relative position. |
addVelocity(Vector3) | void | Adds velocity to the Rigidbody in the specified direction. |
addVelocity(float, float, float) | void | Adds velocity to the Rigidbody with the specified x, y and z values. |
addVelocityBySecond(Vector3) | void | Adds velocity per second to the Rigidbody in the specified direction. |
addVelocityBySecond(float, float, float) | void | Adds velocity per second to the Rigidbody with the specified x, y and z values. |
setVelocity(float, float, float) | void | Sets the current velocity of the Rigidbody. |