Physics and Animation - Start Here

This list deals with the technical facets of physics and animation. Since animation largely depends on physics, the two are grouped together. System-wise however, they are separate and treated on an individual basis.

Physics Primer

Majority of movement is derived from forces, upon which the Newtonian physics is built.

Client input is at an early stage converted into a set of forces that are to be applied on the vehicle they are currently in (or character they are controlling).

Every frame, the velocities of objects are updated given their current forces. To prevent objects from moving indefinitely, we apply drag and gravity to make objects come to a stop at the surface.

Each object has it's physical extremities described by it's Physics Definition, so an object cannot travel faster than what is described in the definition.

Objects by default start with no velocity, and hence no speed. One place that circumvents the force-first approach is that projectiles can inherit a percentage of the speed from the projector, and this dictates their initial velocity.

Animation Primer

There are three types of animations:

  1. Animations being triggered by assessing the current physics state of an object.
  2. Animations triggered by a game-defined event such as a door opening.
  3. Doodad animations that continuously play over and over again.

All three types of animations are tagged by static identifiers such as Idle, Run, Walk, Open, Close, et cetera.

The focus on the first two types of animations is where the physics system is most engaged.

Firstly, any movement animation is chosen based on the current physic state of the object. The current set of forces, moving and looking directions are taken into account when assessing which animation to play. Some animations are cycled, whereas some are fixed to the frame governing the amount of force being used. All animations are normalized to (0, 1) time, regardless of their actual duration. From here on, their cycle speed is determined by the velocity.

As an example, a biped character that has nearly reached their maximum velocity moving forward will repeatedly cycle their Run animation. Whereas if their velocity and looking angle are greater than 180 degrees, they would be cycling the back pedalling animation.

Biped animations are covered more in depth later on as the gait of movement and the amount of displacement on land must be somewhat equal, and the Walk and Run foot placement must match when the animations are normalized.

A great enough force being impacted on the left side of a vehicle will cause the Tilt Left animation to be played, and the amount of leaning or swaying is reciprocal to the amount of force being cast onto the vehicle, and the angle of the force.

This also means that when a vehicle begins to move from being stationary, that a Tilt Back animation is appropriate to play, as it naturally fits within this context.

The Mesh Editor has the most comprehensive description of all the animations and their properties, as it's the tool that an artist will use to bind animations to characters and vehicles.