put player in the exact position and rotation as the seatĪ = transform.position = Ī = transform.rotation = Ī = transform.localPosition = Ī = transform.localRotation = Here is the C# code // make player's parent the same as the seats parent (which is the car) When I want the player to sit in the car, I make the car the players parent, then set the player transform position and rotation to that of the seat. Inside the car I have put a "seat" GameObject whose position and rotation is used to determine where the player will sit. I'm making a unity 3D game, part of the game allows the player to get into a car and drive it.
0 Comments
Leave a Reply. |