funkybunchy Posted March 27, 2016 Share Posted March 27, 2016 I've searched everywhere and I cannot find a solution. I'm trying to make a marble game, but the movement is rather cumbersome. My question is: using the ArcRotateCamera to follow the position of the sphere, is it possible to translate (move) the sphere based on the position of the camera instead of just using the default x and z axis? I've looked into tracking the position vector of the camera, but I don't know what to do with that data to convert it into the sphere's movement. my example uses the WASD keys to move the sphere http://www.babylonjs-playground.com/#2ANQSW#1 is this even possible to do? any help is appreciated! thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 27, 2016 Share Posted March 27, 2016 Hello you can use sphere.translate and use the local axis. We even have a doc for that http://doc.babylonjs.com/tutorials/Position,_Rotate,_Translate_and_Spaces 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.