I am making a third-person (no player control on camera) game. I’m redoing my movement script and hope it’s close to something I can use. My game is a zombie survival in the 1800s so movement plays a large part in how it’s played. Wasd + shift + ctrl. No jumping.
The requirements for it are
-Easy to expand. Functions clear
-State system. I can quickly and temporarily modify movement vars with simple function calls. Reloading, aiming, ectect. Current expectation is they either blend or strongest takes effect above all others.
-Correct animation playing. No animations if player isn’t moving. Footsteps correctly match feet hitting floor.
-Multiple modifiers - weight, wind, temperature, ectect
So before I jump into this, here are my questions.
1: In regards to the idea on states does anybody have any tips on the general concept? CallMoveState(“statename”); Where CallMoveState would than look up the name of the state in another component and grab the vars from it.
2: Animations. I have not worked with them, but thankfully the code I’ve seen is that they’re easy to use. My question is how are footsteps handled? Is it part of the animation? Can these be manipulated to play different sounds on conditions (terrain type).
3: Does controller.SimpleMove( Vector3 ); automatically adjust with DeltaTime? What’s the point in controller.Move(vector3) aside from lack of Y-axis/gravity movement?
4: (for lack of better words) Is it possible to make a variable that stores other variables? A custom Vector3 as an example that stores ints, floats, strings, ectect.