Class
Acceleration3D
View sourceExtendsVector3
Represents an entity’s linear acceleration in 3D as an ECS component.
Use it to describe how an entity’s velocity changes over time. It extends
Vector3 and starts at (0, 0, 0). Pair it with
Velocity3D and Position3D.
Examples
import { Query, World } from '@wimaengine/ecs'
import { Acceleration3D } from '@wimaengine/movable'
const world = new World()
world.spawn([new Acceleration3D(0, -9.8, 0)])
new Query(world, [Acceleration3D]).each(([acceleration]) => {
acceleration.x += 1
})