transform.Translate

So, if i put

transform.Translate(0, 0, speed * Time.deltaTime);

in Update () I can make something travel along in Z. How can I make this happen once another variable happens. I am trying to make a grenade send spikes out once it is detonated. I can make the spikes travel by making the spikes a rigidBody and adjust the velocity. I just don’t want to use physics because I can’t lock it in only X and Z. All help would be appreciated.

I could use physics if I can make everything with a tag of “Spike” ignore everything else with a tag of “Spike” but I can’t think of a good way to do that either.

You would probably want to use the particle system for something like that (with the particles looking like spikes) - run a Detonate function on the grenade which instantiates a particle system in the location of the grenade :slight_smile:

I actually think I have it figured out. I original used a rigid body. I just wanted as little calculations going on as possible and thought that If I don’t have rigid bodies in the scene, it would be less calculations. I really have no other reason to add rigid bodies except for these spikes.

Thanks for the reply though.