My case is,
We are developing Kart racing kind of game, the player is fighting with each other and trying to reach final point .
The thing is I am confused over how to implement following logic,
THe player has missile and granade as weapons.
I can do Missile lock ,then missile follows enemy and hit enemy with it. (Vector3.MoveTowards()).
But how to do grenade?
Suppose both enemy and players are moving foreword in Z axis ,
Case 1:
Player throws granade at enemy.
It goes and hit enemy.
**I can do this same as missile logic.
Case 2:
Player throws granade at enemy.
ENemy change position on X axis (right ,left).
Granade should not follow player to next position.
**Confused over this case, how to let granade not change its position and get blast at surface??