Jump to content

ArcRotationCamera and Mesh translating


funkybunchy
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...