You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const position = new Vector3(),
quaternion = new Quaternion(),
scale = new Vector3();
stageRef.current.l.decompose(position, quaternion, scale);
const rotation = new Euler().setFromQuaternion(quaternion);
save(position, rotation)
Gives me values I think are right but when I reload they're not quite in the position.
I'm applying as such
if (model.position && pivotRef.current)
pivotRef.current.matrix.setPosition(model.position.x || 0, model.position.y || 0, model.position.z || 0);
if (model.rotation && pivotRef.current)
pivotRef.current.matrix.makeRotationFromEuler(
new Euler(model.rotation.x || 0, model.rotation.y || 0, model.rotation.z || 0),
);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to save the values from PivotControls.
Can anyone tell me what the l and w Matrixes are from the onDrag output?
I need to get the Position and Rotation ideally in Vector3.
On Drag
Gives me values I think are right but when I reload they're not quite in the position.
I'm applying as such
Beta Was this translation helpful? Give feedback.
All reactions