Skip to main content

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

SignatureDescription
Rigidbody(Rigidbody)Executes Rigidbody and returns after the underlying engine call finishes.
Rigidbody()Executes Rigidbody and returns after the underlying engine call finishes.

Attributes

NameTypeDescription
instanceRigidbodyRepresents the instance value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
angularDampingfloatget/setReturns the angular damping of the Rigidbody.
angularVelocityVector3get/setReturns the current angular velocity of the Rigidbody.
bouncinessfloatget/setReturns the bounciness of the Rigidbody.
freezePXbooleanget/setReturns whether movement on the X axis is frozen.
freezePYbooleanget/setReturns whether movement on the Y axis is frozen.
freezePZbooleanget/setReturns whether movement on the Z axis is frozen.
freezeRXbooleanget/setReturns whether rotation on the X axis is frozen.
freezeRYbooleanget/setReturns whether rotation on the Y axis is frozen.
freezeRZbooleanget/setReturns whether rotation on the Z axis is frozen.
frictionfloatget/setReturns the friction of the Rigidbody.
gravityEnabledbooleanget/setChecks whether gravity is enabled for the Rigidbody.
gravityMultiplierVector3get/setReturns the gravity multiplier of the Rigidbody.
linearDampingfloatget/setReturns the linear damping of the Rigidbody.
massfloatget/setReturns the mass of the Rigidbody.
physicsLayerPhysicsLayerget/setReturns the PhysicsLayer of the Rigidbody.
velocityVector3get/setReturns the current velocity of the Rigidbody.

Methods

SignatureReturnsDescription
addForce(Vector3)voidApplies a force to the Rigidbody in the specified direction.
addForce(float, float, float)voidApplies a force to the Rigidbody with the specified x, y and z values.
addForce(Vector3, Vector3)voidApplies a force to the Rigidbody at a specific relative position.
addVelocity(Vector3)voidAdds velocity to the Rigidbody in the specified direction.
addVelocity(float, float, float)voidAdds velocity to the Rigidbody with the specified x, y and z values.
addVelocityBySecond(Vector3)voidAdds velocity per second to the Rigidbody in the specified direction.
addVelocityBySecond(float, float, float)voidAdds velocity per second to the Rigidbody with the specified x, y and z values.
setVelocity(float, float, float)voidSets the current velocity of the Rigidbody.