Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller mesh not "moving" with controller #13

Open
smatthews1999 opened this issue Feb 3, 2018 · 0 comments
Open

Controller mesh not "moving" with controller #13

smatthews1999 opened this issue Feb 3, 2018 · 0 comments

Comments

@smatthews1999
Copy link

smatthews1999 commented Feb 3, 2018

Hi. First of all thanks for the VRController. So far it's working great.

Having a big problem with the mesh attached to the controller object, as it is not travelling with the controller object. I am not a threejs expert so I might be missing something obvious :-/

I am attaching (your) mesh to my controller as per the example...

 controllerMesh.add(handleMesh);
 controller.add(controllerMesh);

I am attempting to shuttle my camera about using thumbsticks by adjusting the scene position...

 controller.addEventListener('thumbstick axes changed', (event) => {
      this.scene.position.sub(new Vector3(event.axes[0], 0, event.axes[1])); 
 })

For the most part this is working great. Unfortunately the controllerMesh stays put.
I have examined my controller position and it does not change (the scene does). The controller mesh is a child of the controller, so I don't know what I could be missing.
Thanks.

image
image

Edit....
I should add that I initially attempted to update the controller object position within the scene and could not seem to update it. After looking at your "space rocks" example it appeared to me that you were moving the "world" instead of the controller/camera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant