Here is the link to the Playground that demonstrates my issue: Babylon.js Playground
I have never used physics engines before and I am now trying Havok with a sofa model I found online. When I load my glb without setting a PhysicsAggregate to the root of the glb itself, I have no problems with positioning/rotations/etc.:
As soon as I add the PhysicsAggregate, it loses the Y rotation and a new Z rotation is added:
What am I doing wrong?
Thank you very much for your help.
Here is a modified PG:
The mesh is meshes not . I removed its parenting and set a convex hull instead of a capsule.
Thank you, @Cedric!
Actually, how could I set a single parent to the three sofa components and get a PhysicsAggregate that is the sum of all three sofa components? Is it possible?
This is work in progress on our side to improve mesh/parent setup with gltf. No ETA yet.
Okay, thank you.
To simplify things, I have merged all the meshes into a single mesh. Now I was wondering: would it make sense to use Havok as a system to handle collisions while dragging meshes? I was thinking that during the drag of one of the two sofas I have put into the scene, it might be possible to check for collisions between their two bodies, but I wouldn’t know where to start. Can I ask for your help? Here is the playground: https://playground.babylonjs.com/#WHBL0X#3
Collision works, but it doesn’t have the effect of the correct impulse of physics when moving using dragBehavior.
Thank you for the
I have tried playing with it a bit more, here is the updated playground: https://playground.babylonjs.com/#WHBL0X#6 I was wondering how I could handle the matter of mass, I would like that when the two cushions collide, the dragged cushion completely stops. How could this be achieved?
Here’s an update on the progress I’ve made: https://playground.babylonjs.com/#WHBL0X#10
I’ve been working hard to make the mouse drag interaction more realistic and engaging. However, I’ve noticed that the dragging sensation could still be improved to make the experience feel more natural. I would love to hear your suggestions on how I can achieve this goal.
Furthermore, I’d like to take this opportunity to ask if anyone has alternative ideas for implementing a collision system during object dragging. While the Havok approach has shown progress, I’m always open to new ideas and/or solutions.
Thanks in advance