Implements a generalized gun positioning system for all entity types. More...
Functions | |
| void | Gun_UpdatePosition (GunData *gun, Vec2 ownerPosition, Vec2 targetPosition, Vec2 gunOffset) |
| Updates gun position, orientation and associated particle emitters. | |
Implements a generalized gun positioning system for all entity types.
Provides a shared function to update gun position, rotation, and particle emitters for any entity that uses a gun (player or enemies).
Updates gun position, orientation and associated particle emitters.
A generalized function to handle gun positioning, orientation, and particle emitter updates for any entity (player or enemy) that uses a gun. This eliminates duplicate code across different enemy types.
| gun | Pointer to the gun data structure |
| ownerPosition | Position of the entity that owns the gun |
| targetPosition | Position to aim at (usually player position) |
| gunOffset | Additional offset from owner position |