Adding force to and object

Hi guys,
I’ve created a weapon system
So i wanted to make it if the bullet hit a colider and the rigidbody of that colider
add force as the bullet damage, same forward as the bullet
but i’ve problem, when i add force to object it’s goes randomly, and not as same as the bullet forward
here’s the video that explains :

and thanks for help :smile:

Help ?

you can take the forward rotation of bullet and apply force on object based of bullets forward. in on collision function just pass (transform.forward if iam not mistaken) and use it as direction of force

if i use this, look what’s happens in the video

The video shows the result, but explains nothing. You need to post the code that you’ve used to reach this result.

Basically though, you need to use the bullet’s transform.forward (you can multiply this by speed and weight of the bullet, if you like) and ForceMode.Impulse (instant impact force, not continuous).

Ow, changing ForceMode to Impulse did the trick
Thanks :smile: