I wanted to add jump to the Universal camera controls, or maybe Free Camera.
How would I go about doing that?
Thanks
I wanted to add jump to the Universal camera controls, or maybe Free Camera.
How would I go about doing that?
Thanks
There are a couple of ways to do this,
If you used an imported mesh as your FPS character, you can add a simple mesh(e.g cube or sphere) to the bone on the imported mesh’s head and then make the simple mesh the parent of your camera… Check this out FPS integrated Camera
If you have your FPS character as only the camera, make the camera jump normally, by using animations
Or add a function inside scene.registerBeforeRender function (I don’t know much about the mathematical stuff)
I took some time(less than 10 min) to make a simple solution, if parent mesh is absent…
Click the button located at the bottom right corner to JUMP
Simple Jump
There are some other similar threads with PG examples too
Thanks the first link FPS Shooter had the right bit of code, I figured out the key line i needed was camera.cameraDirection.y += value