Mut

interface Mut : RigidBody

Mutable interface for a RigidBody.

Inheritors

Properties

Link copied to clipboard
abstract val angularDamping: Double

The angular damping factor (see RigidBody).

Link copied to clipboard
abstract val angularVelocity: DVec3

How fast and in what direction the body is moving around its angular axes, in radians/second. This is represented as an axis-angle vector, where the magnitude is the angle.

Link copied to clipboard
abstract val appliedForce: DVec3

How much force has been applied by the user in this simulation step.

Link copied to clipboard
abstract val appliedTorque: DVec3

How much torque has been applied by the user in this simulation step.

Link copied to clipboard

The handles to colliders attached to this body.

Link copied to clipboard
abstract val gravityScale: Double

The factor by which gravity is applied to this body. Default of 1.

Link copied to clipboard
abstract val isCcdActive: Boolean

If this body is currently being simulated with CCD (see RigidBody).

Link copied to clipboard
abstract val isCcdEnabled: Boolean

If this body has CCD enabled (see RigidBody).

Link copied to clipboard
abstract val isSleeping: Boolean

If this body is currently sleeping (see RigidBody).

Link copied to clipboard
abstract val linearDamping: Double

The linear damping factor (see RigidBody).

Link copied to clipboard
abstract val linearVelocity: DVec3

How fast and in what direction the body is moving linearly, in meters/second.

Link copied to clipboard
abstract val position: DIso3

The absolute position of this body in the world.

Link copied to clipboard
abstract val type: RigidBodyType

The body type (see RigidBody).

Functions

Link copied to clipboard
abstract fun angularDamping(value: Double): RigidBody.Mut
Link copied to clipboard
abstract fun angularVelocity(value: DVec3): RigidBody.Mut
Link copied to clipboard
abstract fun applyForce(force: DVec3)

For RigidBodyType.DYNAMIC: applies a (linear) force in Newtons at the center of the body.

Link copied to clipboard
abstract fun applyForceAt(force: DVec3, at: DVec3)

For RigidBodyType.DYNAMIC: applies a (linear) force in Newtons at a specific position on the body, taking into account rotation.

Link copied to clipboard
abstract fun applyImpulse(impulse: DVec3)

For RigidBodyType.DYNAMIC: applies a (linear) impulse - instantaneous change in force - at the center of the body.

Link copied to clipboard
abstract fun applyImpulseAt(impulse: DVec3, at: DVec3)

For RigidBodyType.DYNAMIC: applies a (linear) impulse - instantaneous change in force - at a specific position on the body, taking into account rotation.

Link copied to clipboard
abstract fun applyTorque(torque: DVec3)

For RigidBodyType.DYNAMIC: applies an (angular) torque, causing a change in rotation.

Link copied to clipboard
abstract fun applyTorqueImpulse(torqueImpulse: DVec3)

For RigidBodyType.DYNAMIC: applies an (angular) torque impulse - instantaneous change in torque - causing a change in rotation.

Link copied to clipboard
abstract fun canSleep(value: Boolean): RigidBody.Mut

Sets if this body is able to fall asleep by itself (see RigidBody).

Link copied to clipboard
abstract fun gravityScale(value: Double): RigidBody.Mut
Link copied to clipboard
abstract fun isCcdEnabled(value: Boolean): RigidBody.Mut
Link copied to clipboard
abstract fun kineticEnergy(): Double

Calculates the kinetic energy of this body.

Link copied to clipboard
abstract fun linearDamping(value: Double): RigidBody.Mut
Link copied to clipboard
abstract fun linearVelocity(value: DVec3): RigidBody.Mut
Link copied to clipboard
abstract fun moveTo(to: DIso3)

For RigidBodyType.KINEMATIC: sets this body's kinematic target to a specific position in the world, and the physics engine will apply the correct velocities to move it to that position. In this way, the movement is physically accurate (pushing other physics objects out of the way) but this body will not be pushed by others.

Link copied to clipboard
abstract fun position(value: DIso3): RigidBody.Mut

Sets the absolute position of this body in the world.

Link copied to clipboard
abstract fun sleep()

Puts this body to sleep (see RigidBody).

Link copied to clipboard
abstract fun type(value: RigidBodyType): RigidBody.Mut
Link copied to clipboard
abstract fun wakeUp(strong: Boolean = true)

Wakes this body up if it is sleeping (see RigidBody).