Hello,
I have a static body mass = 0 which I move with animation. I thought any other physics body on top of my static body would be relative to that static body even if it moves.
In my PG animated physics PG I drop a ball on the static animated body and the static body slides from under it eventually.
Any ideas how to make the ball mesh body relative to my static body?
Hi @kri100s
This will be tricky and I’m not sure it’s possible. I did a quick try with increased friction and a restitution of 0 and it still slides.
I see 2 possibilities. 1 is easy, the other is not.:
make the Nimitz not animated everything around moves to fake a movement. I don’t know if it’s enough for your use case but that’s something that is pretty common in games.
compute a linear velocity and angular velocity of the Nimitz, apply/add those velocities to bodies touching the ship. It might be a little tricky to blend bodies velocities and the ones coming from the ship.
I would not try to stick the body position onto the ship. I think physics internal state would be glitched after a while and you would get instabilities after a while.
Thanks @Cedric
The use-case is landing/takeoff an airplane which has its own physics including RayCastVehicle for wheels.
I might try the second option as I am already applying force from all directions to the airplane (lift, drag and so on). I could have an additional vector force as an input to the plain.
I thought about it anyway for simulating wind force.
I don’t quite get how to do it. Doing it once when you get the body velocities and add the ship ones is easy. but for a second iteration, how to split body velocities so you can add again ship ones ? Maybe you can store the decomposed velocities, update velocities coming from ship and recompose.
I thought more about converting somehow ship velocities into forces that I will need to apply to the airplane. I didnt really think this through yet is it even possible. I will start messing around and see where it takes me.