- Home /
How do I create projectile weapons that all have travel time?
I am creating an fps game, it will have melee weapons, but it will have guns/bows and other projectile weapons first and foremost. My question is: How can I script it so that the bullet or projectiles will have their own individual travel time?(this only really applies to the projectile weapons, as melee weapons don't need hit scan or travel time, since they don't use projectiles.)
Don't use raycasting for such projectiles; Instantiate a projectile GameObject that has a rigidbody and collider, and make it move forward somehow (by adding force to the RB or using Transform.Translate, for example).
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to damage player when bullet collides with player. 0 Answers
Prefab shooting damage/health? 1 Answer
Enemies sharing health 2 Answers
Health Regeneration 2 Answers