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've been trying to no avail to have the instances of an instancedMesh be of different sizes/scales.
The code is going through the instanceMatrix and reads the transformation matrix for each instance, modifies its scale and then updates the instanceMatrix. It's done inside the useEffect() and this should make balls of different sizes.
But for some reason, it's not working. Any idea why and what I need to do to make it work?
I'm trying to have balls of different sizes collide. Right now they are all identical and there's no variation.
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.
-
Hi there,
I've been trying to no avail to have the instances of an instancedMesh be of different sizes/scales.
The code is going through the instanceMatrix and reads the transformation matrix for each instance, modifies its scale and then updates the instanceMatrix. It's done inside the useEffect() and this should make balls of different sizes.
But for some reason, it's not working. Any idea why and what I need to do to make it work?
I'm trying to have balls of different sizes collide. Right now they are all identical and there's no variation.
Any help would be appreciated. Thanks.
Here's the sandbox: https://codesandbox.io/s/ballpit-forked-olywwy
Beta Was this translation helpful? Give feedback.
All reactions