Question by
Santacrab · Aug 08, 2020 at 10:12 AM ·
unity 2dtrajectorybullets
Change bullet trajectory slightly towards new player position
Hi, I'm trying to create a bullet then after being shot with a straight trajectory towards player position, tries to curve relative to new player position, without becoming an "homing missile".
Basically the bullet starts moving towards the player since it is shot by an enemy facing the player:
void Start()
{
_bulletRigidBody2D.velocity = transform.up * _speed;
}
While the player moves, I would like to add some lateral force to the projectile, without changing the overall velocity magnitude towards the player, so that the projectile will hit the player if he stops moving but will continue outside the screen once the over the player.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613005152im_/https://answers.unity.com/themes/thub/images/avi.jpg)