https://playcanvas.com/editor/scene/1167506
I am making a simulator to showcase the controls of a drone car I designed.
For the simulator, there are two perspectives: First Person Movement; for walking around outside of the drone car, and Third Person Drone Car Movement; for the perspective of flying it around third person.
The coding question I have is: how do I switch from one camera view and set of controls to another using an arbitrary keyboard press, like “x”?
I want to be able to switch from First Person Movement with the WASD and mouse controls I have now to Third Person Drone Car Movement with WASD/IJKL controls using a button like “x” on the keyboard. (The WASD would be for forward/left/back/right, and IJKL would be for up/yaw-left/down/yaw-right , respectively.)
I got the First Person Movement from PlayCanvas:
And, now I need a reference or help with the Third Person Drone Car Movement as described above, with the additional feature of being able to switch from First Person Movement to Third Person Drone Car Movement using “x” key.
I know there have to be two cameras set up, but that’s about it. I disabled the third-person drone car camera, because it overrides the first-person camera on Launch. In terms of the “added components” like Rigidbody, Collision; all that stuff: I’m not completely sure either; I’m relatively new to scripting and development.
I know there are a lot of ways to do things, and I am going for somewhat “professional”, but the bare minimum will do as well. I don’t mean to make it sound like I’m making you do all the work, but my main skills are in “designing” hence, the descriptive forum post of what I need :p, but I am trying to learn, and the way I learn best is by collaboration, discussion, and dialogue, so if we can: let’s please use this thread to develop this feature together for future reference for other novice developers such as myself!
Thanks so much!