Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
tedfordteddy's avatar
tedfordteddy
Honored Guest
10 years ago

How to switch from OVR controller to drive a truck instead?

Hi,

I've amended my scene so that that when the player presses a kayboard key, they are transported into the driver seat of a truck - after they have been walking around a flat scene for a while.

Could someone please let me know what would be the next step so that the user can use the Xbnox controller to move the truck forwards/back etc.

Should I set up a boolean for the OVR controller to enable/disable usual control, and then make a new script to go forward/backward etc on the truck?

Or maybe I should try and attach the OVR to the truck, but the speed would be wrong?!

Just throw me a hint in the right direction and I'm on it. (I'm javascript).

Andy

1 Reply

Replies have been turned off for this discussion
  • weasel47's avatar
    weasel47
    Heroic Explorer
    You do want do enable/disable usual control somehow. A boolean is one way. You could also disable and re-enable the script itself. Either way, you probably would want a completely separate script for vehicle controls. It can be enabled/disabled as well.

    Also, you probably want to make the OVR rig a child of the truck object when the player is in it.