I have a spaceship that, when not being piloted I want to maintain velocity. It does so correctly, and the character keeps up with it when all of it’s components are turned of (When in pilot seat). However, when the character exits the seat, I want them to be able to walk around the ship, but instead they don’t keep up with the ship and slide off, passing through any colliders on the way because they don’t seem to affect the player when the rigidbody is in motion and the character is not following. How can I change the character to keep up with the ship when in motion? I’m using the standard first person controller right now, I have tried scripting my own and downloading all applicable ones from the wiki to try and fix this, but none of those solutions have worked. The ship moves by using AddForce, and has a rigidbody with isKinematic turned off, and I have tried the player with isKinematic off and on, both having the same result. Surely this has affected other people, and I have read every single post about this and gotten no useful or working fixes. Does anyone have a solution? Thanks!
I am not super Unity geek but from what I understand player is affected by external forces, motion of the ship.
There are couple things that I could suggest:
- Use ship transform as character parent when he is inside of the moving ship.
character.transform.parent = ship.transform
- Make sure your character control applies changes to your character locally.