Forum Discussion
tedfordteddy
10 years agoHonored Guest
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
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
- weasel47Heroic ExplorerYou 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.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device