Lybrial Posted May 12, 2015 Share Posted May 12, 2015 Hello, I want to create a FPS Camera but i also want to be able to jump. The FPS camera is really not the problem:http://www.babylonjs-playground.com/#FG9BV#1 My Problem now is to add the jumping! How can i implement a real jump? The collision should pretend me from jumping through other objects. Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 13, 2015 Share Posted May 13, 2015 Hi ! You have to use a physics engine to do that.Create a box behind the camera, that will represent the player. Set the camera parent to the box (camera.parent = box).Attach a physics state to it, and add the behaviour "when keyup space is launched, apply an impulse to the box along y axis". This will need some refractoring to your code, but i'm sure you will be able to do it Good luck ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.