- Home /
Player instantiates Backwords
So recently i added a lives script to my game where the player has a certain amount of lives and uses a life when spawned in the game. So my lives script must of did something and changed my player rotation to face backwards and not forwards. Here how it suppose to look I delete the player prefab from the scene so it won't have 2 player ships on each other. Here is the Lives script for reference
void Update()
{
if (player == null && playerLives >= 1) {
playerLives--;
player = ((Transform)Instantiate (playerShip, new Vector3 (0, 0, 0), Quaternion.Identity)).gameObject;
}
}
So after i hit play my characters Looks like this I don't know why it does that, so you might be thinking "How about adding a quaternion.Euler" well i tried that, it works however the player shot Fires Backwards This been frustrating me for the pass few days, if anybody can help i would appreciate it. Sorry if it's a long read
This problem is usually from bringing the mesh into Unity wrong (3D) or by having the sprite texture wrong (2d). This looks like 2D. Try rotating the texture in your image processing program.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
What should I change in this instantiating a GameObject in a script using Unity? 1 Answer
touch to instantiate and move object ? 1 Answer
C# Preserving GameObjects' Previous Meshes 1 Answer
What is the best way to instatiate an array of connected GameObjects? 0 Answers