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
I'm currently loading glb models an animations using the standard code below. The glb files contain animations are offset from the world root in blender when they're exported. For example, it may start at pos (10,0,0) rather than (0,0,0). When animations are loaded they always start at the world root. Is there currently a way to read the file's transformation data for the object containing the associated animation for the initial placement? Preferrably at runtime
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently loading glb models an animations using the standard code below. The glb files contain animations are offset from the world root in blender when they're exported. For example, it may start at pos (10,0,0) rather than (0,0,0). When animations are loaded they always start at the world root. Is there currently a way to read the file's transformation data for the object containing the associated animation for the initial placement? Preferrably at runtime
const group = React.useRef();
const { scene, materials } = useGLTF("/model.glb");
const clone = useMemo(() => SkeletonUtils.clone(scene), [scene]);
const { nodes } = useGraph(clone);
const { animations } = useGLTF("/animationFile.glb");
const { actions, names } = useAnimations(animations, group);
return (...)
Beta Was this translation helpful? Give feedback.
All reactions