I am working through the FPS Tutorial, and have run into one snag and one anomoly.
The snag is from 7. Missle explosions.
In step 4. “Finally, we want…” the two user steps are:
What this is trying to do is add a javascript that detects the first collision of the object “missile” and calls an explosion animation at the contact point, and then destroys the object “missile”.
What I find is that, dragging and dropping the javascript onto the prefab object “missile” in the PROJECT view doesn’t work. I find that if I drag the prefab object “missile” into either the scene SCENE VIEW or HIERARCHY windows, it will successfully attach after warning me that “Losing prefab This action will lose the prefab connection. Are you sure you wish to continue?”. This also causes an iteration of the object “missile” to instantiate in the game world, which should not be the case for the missile.
I’ve re-read the tutorial, and searched the forum, and no one seems to have had the same problem. How can I create a missile prefab and attach the javascript to it without bringing it into the scene/world?
What am I missing? My brain, prolly…
The anomoly:
I find that in the previous step, 6. Adding a weapon, that when I follow the steps and create this tennis ball “launcher” (yes, I did have to texture them bright yellow), that when I use it within the tutorial environment that the “missile” objects do not consistently collide with objects or surfaces on the tutorial geometry. About half the time, they just pass through the surface plane of any given object. This seems to be something related to the vector of the “missile” object. If I don’t move, the behaviour of the “missile” object is consistent, but if I move the view and fire again, the “missile” object may bounce against a surface, or it may not. In on given position/view/vector, the “missile” object will always bounce, or always pass through the plance it hits. Moreover, each surface is independent. If it bounces off the floor, it may (or may not) then pass through a wall or one of the other objects in the scene. I’ve seen some balls go through a “container” object, pop out the other side, and then bounce along the ground and roll off the edge into the void.
Tho’ts? Suggestions?