libprimis
libprimis copied to clipboard
Usage of local coordinate system for projectiles
Currently, projectile objects use a triple defining a set or world coordinates to describe their orientation in space. This is rather clumsy to manipulate, as projectiles have arbitrary velocities and therefore in general have no dependence on the world coordinates.
Using a local coordinate system for projectiles would simplify arbitrary modification of projectile properties, as modifications can be done in a rational way from the point of view of the projectile itself.
To be consistent with the coordinate system used by mapmodels and other game entities, an orientation based on Euler angles (yaw, pitch, roll) is likely the best candidate. This coordinate system would follow with the local velocity (tangent vector) of the object.