- Home /
Spawn player to a different scene
Please whats wrong with this code ?,i have the script on the player and it works ok but when the player is spawned to the location and i want to move the player forward back left or right he moves the opposite direction or if i move forward then press left to turn left it doesn't work.
The character movement works properly only when its being spawn it does that.
public Transform spawnPoint;
void OnLevelWasLoaded(int thisLevel)
{
spawnPoint = GameObject.FindWithTag ("SpawnPoint").transform;
transform.position = spawnPoint.position;
}
Can you add your movement code to your question? Form this script alone i find no problem
Was using the character controller from the new unity 5. i think i found out the problem it from the Rigidbody, when he spawns its x y z freeze rotation gets turned on.
Your answer
Follow this Question
Related Questions
one scene multiple spawn points 1 Answer
Object reference not set to an instance of an object?! 1 Answer
How to set up random spawnpoints? 1 Answer
Spawn Point 2 Answers