I'm trying to simulate objects movement on moving object. Have read all the documentation on rigidbody and rigidbody2D and can't find good answer. Pretty sure that same problem exist when making same thing on 3D space.
Main problem as I see it: when you apply force to parent rigidbody object it works perfectly, but all child rigidbody objects do not receive this force (so they stay on same place).
Example: I got ship with passengers. Ship is moving by forces applying to it. Passengers should move freely on this ship, sometimes feeling acceleration and direction changings. Like if you apply to much force - ship goes faster then passengers (they all fly down) until ships velocity and passenger velocity are the same (because of friction).
However I can't find solution how to simulate this in 2D Top View game. Main idea was, if I can't apply same force, then copy velocity. But after such passengers can't move, because their velocity are always replaced by ships velocity. Tried to make passengers velocity like ShipVelocity+PassengersVelocity, but after first iteration passengers velocity becomes bigger then ships and it seems impossible to work in local ship cords.
How can I achieve my goal?
↧