Space Shooter Unity 5 - Shooting Shots - Issue: Shots wont appear in playmode

So I’ve been working on the space shooter unity tutorial in Unity 5. I’ve been doing fine up until the 7th video, “Shooting Shots”. I’ve verified my code multiple times, looked up similar problems, and checked common issues with the new Unity 5 and I still can’t find a solution to my problem.

The troubleshoot is that when I enter playmode, my shots are visible in the hierarchy but not in the game itself. I’m pretty sure it has something to do with my player script or shot spawn because if I enter playmode and drag my bolt prefab into the hierarchy, it works fine. However, if I move my player then shoot, it still spawns in the starting position of the player as if it isn’t a child.

Another thing to mention, I had a bit of trouble before but resolved it by adding code to the Mover script. I doubt this is the culprit because before I added the extra code, the same thing happened. I will post the script anyways so anyone can take a look.



What is inside the bolt? Anything that would actually render something? What do you see, when you pause the playmode and double click on the bolt while in scene view? 128 Units in z direction looks like, it could be far outside of the view-frustrum.

1 Like

First, the reason the bolt was at 128 z was because I shot it in playmode then took a screenshot. When I shoot a bolt you can see the z axis increasing in value as a normal bolt should. In other words, the bolt acts like it should buts its just not visible. As for what I see in the scene view, I see a selection of the bolt but can’t see the material. However, if I drag my bolt prefab into the hierarchy whether it’s in playmode or not, I can see it and it works fine. I’m not sure what you mean by “What is inside the bolt? Anything that would actually render something?” because I am very new to unity and barely understand the main mechanics. Here are some screenshots though.

3350837--262118--bolt_clone_hierarchy.jpg
3350837--262119--bolt_hierarchy.jpg
3350837--262122--bolt_inspector.png
3350837--262123--bolt_VFX_inspector.png

One thing I have noticed is that, I’ve loaded the finished Unity Space Shooter project and I’m comparing it to mine and MY bolt’s capsule collider’s direction is on the Y axis instead of the finished project which uses the Z Axis. I doubt this is the source but it’s a bit strange in itself.

maybe for some reason, the bolt is rotatet in such manner, that you look on the “side” of the plane.

1 Like

I just verified this and you were right! I was able to rotate the Shot Spawn 90 degrees so that the bolt(clone) was facing up. I’m not sure if this will effect anything in the future but for now everything seems to be working fine. Thanks!