Labs · Vectors
Motion 101: Acceleration
The core motion algorithm: velocity += acceleration, then position += velocity. Each object stores these three vectors, and velocity is capped at a top speed.
- Toward mouse: acceleration points at the cursor, so movers overshoot and orbit around it.
- Random: a new random acceleration every frame.
- Perlin: the direction of acceleration drifts smoothly with noise.
Green arrow = velocity, orange arrow = acceleration (both enlarged).
Controls
- Acceleration
- Movers
- Top speed
- Acceleration magnitude
- Show vectors
- Trails
Evolved into Spaceship: Thrust & Rotation.