- Home /
Advanced Space Shooter
I took it upon myself to go ahead and attempt to create and finish the rest of the space shooter without the tutorial. I have almost everything ready except for one small problem. The enemy ships will spawn in backwards, and I can't figure out how to modify the y rotation angle of the quaternian. Below is the instantiate code for the Enemy ship.
The enemy ships will spawn in backwards
explain please, or image will be nice
Sorry, at the time I don't think I fully realized that quaternians are a continuous rotation. Here's an image of how the spawn.
The asteroids and the ship are falling towards the bottom of the scene.
Answer by Wideopen411 · Jun 12, 2015 at 11:15 PM
You are spawning it in at it Quaternion.identity This just spawns it in with no rotation, it just uses the objects parent axis. If your ships mesh is a child in the prefab, you can simply rotate it 180 degrees and resave the prefab. However if the ships mesh is the parent object in the prefab, youll have to do a little fiddling. So, Make an empty game object at 0,0,0 Name it ship or whatever. take your current ship prefab, and make it a child under this gameobject. Then rotate the ship (not the parent gameobject) 180 degrees. Then resave this as your new ship prefab. Whatever rotation you have the prefab is how its going to spawn in. So make sure your ship prefab is facing downward with a rotation value of 0,0,0 and you should be good.
No problem! Sorry I haven't checked here in a while. Did you get it working? I can explain it a little better if you need me to. It sounds confusing to do, but after you do it a few times you'll understand how it all works.
Your answer
Follow this Question
Related Questions
Bullet spawning to low.. 0 Answers
Can I call a function on a behavior attached to a prefab from it's spawner object? 1 Answer
Object doesn't stop moving OnCollisionEnter 0 Answers
I need To spawn game objects randomly, but I'm Getting an error in My script, Please help! 1 Answer
How to spawn a 'boss' after all enemies defeated and then kill that 'boss'? 1 Answer