object replacement

Hi

I can’t seem to get an object to replace after receiving damage.

From the FPS tutorial scene, I have made the reefer container receive damage. it’s blows up as in the explosion works but my object replacement doesn’t appear. If I choose the barrel instead, it does?

-So, when I want to use my jittered container as the rigidbody replacement, what do I need to do? Make it a prefab?

If I want to use a torpedo say as the projectile, how do I make it collision detect? The mesh collider makes it bounce all over the place.

…I’m trying to shoot a ship with a torpedo.

M

Yes, It should be a prefab. Sometimes an object might be visible somewhere but its root node/transform/Actual location is elsewhere (like at the origin (0,0,0)

Add a box collider and the rocket script from FPS Tutorial. Create a prefab, drag your rocket onto new prefab. Use the prefab. You can delete the origional from scene not project view. Add a constant force component if necess.
HTH
AC

Targos

So, regarding the replacement object where I can’t apply a rigidbody in the project view… when it’s a prefab, it doesn’t appear in the scene view; as in the pregab akes care of it?

OK, cool, get the idea.

Thanks!

M

PS. How cold is it in your neck of the woods? 9 deg C is cold for us not so used to it folks here.

You got it right about prefabs…

REALlLY Freakin cold!

:shock:
AC

pregab akes… should read; prefab takes. Sorry!

M

:lol: Perhaps you are in Amsterdam :slight_smile: Don’t know why this tickled me so much, but this made for a great start to my day.

ifrog

Ha!.. hope the rest of your day is too!

M

OK, the prefab worked for receive damage (yep, the reefer again)…

But haven’t gotten the Torpedo to collision detect with the ship, it just spirals all over the place and doesnt trigger an explosion?

M

Explain which scripts your using? And if you have modified them, point out where and post them?
Cheers
AC

It’s OK, thanks anyway!

It really did come down to being thorough with prefabs. Learned quite a bit today… also I wasn’t putting the rocket script in the right place.

Works perfectly even if it looks a little crude.

Cheers!
M