Search Unity

Change Player from "infantry" to "Vehicle"... thoughts on a good, simple way?

Discussion in 'Getting Started' started by DerrickMoore, Sep 21, 2018.

  1. DerrickMoore

    DerrickMoore

    Joined:
    Feb 4, 2018
    Posts:
    246
    So, I have a Rocket, that can fly between Planets, land at a Base Area, and take off again into Space..

    what I need to do now, is allow the Player to get out of the Rocket and have the Character (Ethan) walk around the Terrain, maybe pick up some objects and interact with some buildings...

    and I like big terrains.. I want the player to be able to set a destination with a mouseclick eventually, walk away for 5 mineuets make coffe, and come back to see if they discovered anything new..


    but.. how should I go about that, I think what I can do is..

    have a button on my screen (or hot key) for "leave vehicle".. this destroys my PlayerRocket object, and instansiates my new OnFootPlayer and a "dummy" Rocket that looks exactly the same but has no scripts attached to it..... (who has a jetpack)… then this OnFootPlayer can move around Unity Terrain, and when ready can walk back towards the Rocket.. and I'm thinking something simple here, like "walk up to the collison trigger box and automatically jump in", like, removing that OnFootPlayer object and the "dummy" Rocket and instantiating my PlayerRocket again...

    Rocket


    Ethan in a Spacesuit... um.. I Fixed that creep breathing sound effect..




    Here is a Dropbox link to a "stablish" Build if anyone would like to give some feedback... https://www.dropbox.com/s/886s56r2abipelj/StarshipStowaway030.zip?dl=0
     
  2. Bill_Martini

    Bill_Martini

    Joined:
    Apr 19, 2016
    Posts:
    445
    Ok, I'll bite.

    I would probably just disable the collider on your ship. Spawn the astronaut inside the ship and animate him outside the ship and re-enable the collider. Moving the astronaut perpendicular to the camera direction should make it look like he's disembarking the ship without doors or other complications.

    An easy solution, but you may want something more.