Hi I have recently finished the Complete Godot 3D: Develop Your Own 3D Games Using Godot 4 and after Project Boost I have an idea for a game.
I am making a game with a spaceship in 3d. You control the ship by turning on and off individual engines. If you turn on right engine the ship turns left and vice versa. Turning on both engines makes the ship go straight ahead.
Alt A: Sounds simple enough and I have a working prototype that uses rigidbody3d for the engines and the ship, I use joints for connecting them together. I add forces to the engines and they push the spaceship.
This is not working so great, it is wiggly and janky, the engines move in weird angles.
Alt B: So I tried making the engines characterbodies instead, just adding variables and engine positions from center to them so that the main ship can use to apply the correct forces to the ship.
This also kind of worked but I lost the turning functionality and had to calculate and apply torque to make the ship turn. I also got a problem where the ship turns a little at first but then suddenly turns exponential.
Alt C: The third thing that I am trying now is to use character body for the ship and not use forces at all. I think this is the way to go since I really don’t actually need physics. And it will make online multiplayer easier to implement.
My question is:
- How would someone with more experience of godot design this mechanic? A, B, C or perhaps a whole other approach.
- If I am going with alternative 3 how woud I calculate the combined forces of the engines and apply them to the characterbody3d(Ship)
To clarify I am not looking for someone to give me code, I am prepared to figure it out for myself but I need some direction to avoid wasting to much time this early in the project.
Best regards Michael