Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Orient to velocity

Discussion in 'Scripting' started by IconDevco, Oct 23, 2015.

  1. IconDevco

    IconDevco

    Joined:
    Mar 17, 2013
    Posts:
    3
    Hello. I believe this is my first post, but I'm having difficulty orienting my rocket to its velocity.

    My rocket reacts with gravity, so i want the nose to plummet when there is no force happening
    I have tried
    Quaternion.Euler(rigidbody.velocity);
    which was pulled from a thread asking a rather similar question



    This is exactly the mechanism i want because i will be able to slighty turn the rocket, but i want gravity to play a huge role. Any help would be greatly appreciated.

    So to recap with no text in between:
    How do I get my rocket to face it's velocity?
     
  2. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
  3. IconDevco

    IconDevco

    Joined:
    Mar 17, 2013
    Posts:
    3
    Neato! Thanks
     
  4. IconDevco

    IconDevco

    Joined:
    Mar 17, 2013
    Posts:
    3
    unfortunately it didnt help. The sprite changes axis and throws it off