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

rig.position.set() #26

Open
Eytanm opened this issue Jun 28, 2022 · 1 comment
Open

rig.position.set() #26

Eytanm opened this issue Jun 28, 2022 · 1 comment

Comments

@Eytanm
Copy link

Eytanm commented Jun 28, 2022

hi,
I want to change the position of my Rig to start FreeMovement from a different position in the model.
I can change position of camera but not of rig...
this.rig = new CameraRig(this.camera, this.scene) **this.rig.position.set(-2.738747813014968,0,-34.80472085495976);** // this.camera.position.set(-2.738747813014968,0,-34.80472085495976); // this.camera.quaternion.set(-0.016886286519686242,0.9595464380905118,-0.05896608108424796,-0.2747880779017762); this.controls = new FreeMovementControls(this.rig, { panDegreeFactor: 2, wheelScaleFactor: 0.01, keyboardScaleFactor: 0.015, keyboardDampFactor: 0 }) this.controls.enable()

@noisyneuron
Copy link
Contributor

Hi @Eytanm, this is possible with the setworldcoordinates function.

The rig unpacks the transform to a few different objects to allow for more intuitive controls, so setting the position directly might not lead to expected results

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

2 participants