
Bullet collision help
-
- Posts: 25
- Joined: Mon Sep 17, 2012 1:17 am
Bullet collision help
Hello, I am using a Raycast to determine if my bullets will hit an Entity. My goal would be to apply force exactly where the Raycast hits, and not the entire entity. Right mow I am altering the Linear Velocity. But, that simply moves the box. I tried ApplyImpulse too, but that does the same thing. I made a gif to show you how it currently acts. I would like the bullets to cause the entity to rotate and such. So for example, if I shoot a corner, the Entity will spin in that direction. I am sure it is fairly simple, I just cannot find out which one would work. Thank you.


Re: Bullet collision help
Entity.ApplyImpulse is what you're looking for. For the impulse location, use the ray hit location instead of the center of the entity.
-
- Posts: 25
- Joined: Mon Sep 17, 2012 1:17 am
Re: Bullet collision help
This worked perfectly, thank you very much!Norbo wrote:Entity.ApplyImpulse is what you're looking for. For the impulse location, use the ray hit location instead of the center of the entity.