Good evening everyone.
I'm sorry if I should have been able to find the answer to this myself. I have tried, and failed.
I've got a simple space game. I want the character's object to be able to walk around inside his ship as well as pilot it. I've got state changes working fine, no issues there, but if you leave the pilot's position after adding some force (the player is kinematic while piloting) you then get left behind by your ship, or at best spun around inside the cockpit. How should I fix this?
The player's object needs to inherit changes in rotation and position, in the same way a parent-child transform hierarchy does, but also have its own movement abilities.
Joints are out because I need relative movement (unless it can be done with ConfigurableJoint, but I can't see how). I can't just use transforms or isKinematic on the character because that will just delay the issue until small ships have to dock inside big ships. Parenting the transform normally doesn't cause motion to be inherited. I've tried having them parented from scene start and dynamically parenting. It doesn't seem to make a difference whether the child is under the root ship object (with rigidbody) or some child object (no rigidbody, which is strange because it should work fine...)
If I switch to Editor while the ship is spinning and manually move it using Gizmos, then the character moves along with it, no issue.
My only solution would be to recursively apply any force to all child rigidbodies as well, but then there's pivot point problems and it will get stupidly expensive for ships with large hangars.
Thank you for your time and help,