Translate a transform relative to another game object.
I am making a space game in which the player can fly around in their space ship or get up and walk around the interior. I want the player to be able to walk around even in the ship is in motion, so I need the player to move by the same amount as the ship is relative to the ship. Parenting is not a solution I am looking for as it would interfere with other features I have planned. I know I can do transform.Translate(movement, Space.Self or Space.World), but I need the player to be translated relative to the ship, which is another game object. If this is not possible, then how would I measure the ship's movement relative to the world, so I can then apply this movement to the player also relative to the world, and then obviously also add on the player's movement.
Your answer
Follow this Question
Related Questions
Code Improvement Help : moving object inside radius buggy ( DOTween & without ) 0 Answers
Position, left goes right and right goes left 0 Answers
Diagonal character movement 0 Answers
Move a Rigidbody by a specific certain amount in a smooth motion? 2 Answers
Placing an object between 2 objects. 1 Answer