Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Mario Kart Shell Bouncing C#

Discussion in 'Getting Started' started by EdgarCarrera, Mar 11, 2015.

  1. EdgarCarrera

    EdgarCarrera

    Joined:
    Apr 21, 2014
    Posts:
    255
    Hi guys, how are you?

    i hope u can help me.. i wanna make a shell bouncing like mario kart game.

    how i can make a script with C#? thanks u
     
    Sacha_Silva likes this.
  2. Pysassin

    Pysassin

    Joined:
    Dec 27, 2012
    Posts:
    87
    When collider hits another it will call the appropriate collision function giving you the information on the normal of the hit. Set the velocity equal to the magnitude of its current velocity pointed at the reflection of the normal. Your essentially doing the same thing as when you shine a light in a mirror and see the light reflected appropriately
     
  3. EdgarCarrera

    EdgarCarrera

    Joined:
    Apr 21, 2014
    Posts:
    255
    can u show me a demo?