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

Aligning hovering vehicle with surface below

Discussion in 'Scripting' started by darugylsweater, May 12, 2015.

  1. darugylsweater

    darugylsweater

    Joined:
    Oct 26, 2013
    Posts:
    17
    So for a school project my teammate and I are making a hover racer in the same vein as Wipeout and F-zero but we are having a good deal of trouble with the movement of the vehicle, we want something like this (0:35)

    Were you are racing around a cylinder but no matter what we do we are having trouble with both a stable hovering and moving around a tube like that, any help would be great
     
  2. K0lipser

    K0lipser

    Joined:
    May 12, 2015
    Posts:
    8
    Look at "how to move things in Unity". You have to know something about the basics like Transform, Vector3 and so on.

    In addition, you need models. You can copy some from 3d archives or you create them by your own. In both cases, you have to know something about modelling.

    If you don't write some real issues, no one can help you.
     
  3. darugylsweater

    darugylsweater

    Joined:
    Oct 26, 2013
    Posts:
    17
    Sorry i will be more detailed, we are trying to use raycast to make the player float and also to detect the ground beneath the player so that we can align the player to it. We have look at other forum pages (http://forum.unity3d.com/threads/character-align-to-surface-normal.33987/ - http://answers.unity3d.com/questions/322140/aligning-object-to-surface-normal-not-working-upsi.html - http://answers.unity3d.com/questions/410365/raycast-align-with-ground-normal.html)
    but these are all in Javascript and we don't know Java. So after we align the player we can move it by adding force or torque to the rigidbody, the major problem is that the player doesn't "stick" to the ground so when you start moving you can fly off the track, we don't want the player to do this but we cant find a fix that is in C#. Our last problem is that like in F- Zero we want the control to be accelerate brake and strafe left and right so we need the player to turn with the track, if you want a great example of what we are going for try out this demo -> http://radial-g.com/?page_id=11 its a game a group of people have been working on that is on steam (also made in unity)
     
    Last edited: May 12, 2015
  4. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    first off unity's "javascript" isn't Java. really it should be called "unityscript"...

    you'll probably be best off looking up "unity faux gravity", you'll find a bunch of tutorials on how to stick players to spheres like in mario galaxy and the like. You essentially want that, but your terrain is curved the other way :)
     
  5. darugylsweater

    darugylsweater

    Joined:
    Oct 26, 2013
    Posts:
    17
    Thats a start but what about making the vehicle follow the track
     
  6. PoppyD

    PoppyD

    Joined:
    Jun 22, 2015
    Posts:
    1