Lander Rocket Physics

Hello all.

Ok I am stuck, been looking at this all day and can not figure it out. I have gone through probably 30 web pages and video’s but nothing explains it or they deviate from everything or even just post a link to totally useless information.

I have a cylinder, a thruster on bottom and 2 left and right thrusters close to the top.

Now, the bottom main thruster I have got working fine,

public Rigidbody rb;

void Start() {

   rb = GetComponent<Rigidbody|();
}

void FixedUpdate() {
if (Input.GetKey(KeyCode.W))
     {
       rb.AddRelativeForce(Vector3.up * thrust);
     }
}

Now this works nicely. If I add my left and right thrusters, add rigidbody because it seams like that is the ONLY way to do it??? then the damned things decide they want to take of each in separate directions. I have been trying to do this without rigidbody but 100% googling it says rigidbody.

Now I have searched high and low and there does not seem to be any good tutorial materials on a lander type game. 3 simple thrusters physics, no one can seam to explain it.

Please, if anyone can show me how this should be done I would be forever greatful. I bet you its dead simple but after searching the web for at least 4 hours reading through all the pages for a day, you tend to get frustrated. There must be a easier way to find information, like a unity snippets C# site?

Also, most tutorials out there ar unities Java. Well everyone keeps saying that unity is moving to C# away from java?

Any help appreciated please.
Thx.

Are your rigidbodies colliding with eachother? What if you ignore collisions between them?
If you need to have collisions with them, have you looked into joints?
Maybe you can post a video of what you are seeing.

@HiddenMonk Doh I feel dumb. I had collisions on the left and right thrusters why they took off at start. Thanks HiddenMonk.
Now to figure out how to rotate the ship instead of moving it left and right .

If anyone has links to some good rocket ship tutorials in C# please share.

1 Like

Is not exactly what you are looking but it can help you in other further problems about
Unity video

Hope this questions can help you:
Can you add the left and right force of the thrust in the top of the cylinder game object?
And if the rocket is going to one side, is the (Vector3.up* thrust); pushing up in world Y axis?