PhysicsVelocityComponent

A Component that directly sets an entity’s linear and angular velocities.

This component applies a one-time, instantaneous change in motion (like an impulse) rather than continuously setting a constant velocity or force. Linear and angular velocities are measured in meters per second (m/s) and radians per second (rad/s), respectively, and are applied in world coordinate space.

To work properly, the entity must also have a CollisionComponent and a RigidBodyComponent. The rigidBodyMode of the RigidBodyComponent can be set to either RigidBodyMode.KINEMATIC or RigidBodyMode.DYNAMIC.

Constructors

Link copied to clipboard
constructor()

Default constructor.

constructor(linearVelocity: Vector3, angularVelocity: Vector3)

Creates a PhysicsVelocityComponent with the specified velocities.

Properties

Link copied to clipboard

The angular velocity of the physics motion around the center of mass, measured in radians per second (rad/s).

Link copied to clipboard

The linear velocity of the physics motion in the physics simulation, measured in meters per second (m/s).

Functions

Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String