New enemy turret enemy won't update velocity

Hey I thought I give a try to expanding the enemies so I made an enemy with a spining turret but the projectiles velocity never update. The screenshot shows the tan projectiles instantiating in place. Thanks for any help and have a great day.

1 Like

What do you get if you put in

Debug.Log(projectileSpawnOrigin.transform.position.y);

I suspect that it’s going to show 0 which in turn means you’re setting the velocity to (0,0) which means it won’t move.


It seems to be the expected results. Thank you for replying BTW!

Hmm odd. What if you try to hardcode in the velocity initially to test. Can you get it to move?

Grabbed the rigidbody2 component from the instantiated gameobject “bossEnemyProjectile” instead of “projectile” and it seems to work. Thanks for your help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms