TransformControls customisation #616
jonportelli
started this conversation in
General
Replies: 1 comment 1 reply
-
not sure what you want to achieve? you want to set the quaternion? then thats <yourObject quaternion={[x, y, z, w]} /> the _x stuff you see in the console are threejs internals. you dont set them directly, you use obj.set(...) which is what the code above will call, see: https://github.com/react-spring/react-three-fiber/blob/master/api.md#shortcuts-set |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have modified the TransformControls example from the Drei library https://codesandbox.io/s/r3f-drei-transformcontrols-dde06?file=/src/index.js I have it set to "rotate" mode to demonstrate where I am having difficulty accessing certain props. When you open the console, you will see
console.log( transform.current.quaternion)
. If I offset the values ie. _x: 0.1 _y: -0.1 in my local browser, I get my desired effect but when i come to implement, I believe this is not accessible in the .TransformControls.d.ts API ?Any tips would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions