|
Asuming your physics engine is leading, your controls would control a kinematic object, directly driving said object in the physics engine.
You then step the physics engine each "tick". You slap on an update callback to each object and have this callback update the visual world.
There is no way to avoid data "duplication" though, as both the physics and the visual world need their own object representation, where they are being kept in sync with the callback.
Update audio just looks weird, tbh, you should first start reading up general game-engine information and how they are put together, and how everything works.
|