Search Unity

2D Rocket Physics, trying to make an object rotate before falling

Discussion in 'Physics' started by TheBlackBox, Feb 15, 2019.

  1. TheBlackBox

    TheBlackBox

    Joined:
    Jan 13, 2014
    Posts:
    33
    In my game, the player fires rockets into space, hoping to be able to land on the moon.

    What I am trying to do, is create some fun physics so that the rocket can run out of fuel too early and instead start to plummet back towards the Earth.

    I am currently using a Constant Force 2D Component in order to provide the force for the rocket - and then reducing the force to 0 once fuel runs out. However right now there is no rotation on my rocket. Instead the rocket simply falls straight back down without moving in any other direction.

    I would like for my rocket to tilt and fall back to Earth so that it crashes in a different location, moving along the X axis, with the top of the rocket now facing down.

    ---

    So far I have tried solutions that have involved using Quaternions and RotateTowards. I'm wondering if there are any solutions that are purely physics based so that I don't have to "fake" the effect, to some extent.

    I have been wracking my brain with this one for hours and would really appreciate any help that you can give!

    Thanks,

    Brandon
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    By "purely physics" you mean stuff like FAR for KSP?

    I'd just interpolate/RotateTowards forward to velocity.