My bullets are dealing damage to the enemy even when its not hitting it (when th bullet passes at a very close distance).
I want to make it hit accurately.
Hey,
I highly recommend for any shooting game, your make your own collision type.
Go to Settings>ProjectSettings>Collision. Press new object channel and call it Projectile. If you drop down presets you can set up how projectile reacts to the current defaults.
Now you have that. You can go to your character, and click on his collision capsule, set it to ignore projectiles. Now click your character mesh, and set it to block projectiles. In your actual projectile, set it to be a projectile on the collision dropdown. Now you have accurate collisions (it will be hitting your characters phyx collision so make sure you have one set up). And because you have a projectile custom collision you can do all sorts of other cool stuff like have it penetrate glass etc.
Yeah… Characters tend to be pretty complex (geometry-wise), so having a box collision for each of the limbs would be a better idea. Less stuff to calculate, less stress on the CPU, better performance, etc.
Something like this:
Then you can have headshot events triggered (e.g. extra damage, decapitations, helmets flying off, etc), instead of dealing the same damage as when hitting the bottom of the character’s foot.
Can u play tell me how i can achieve this?(I mean where are the options)
Actually i have tried all this and even though the projectile set to only collide to the mesh ,its still dealing damage to the character when the projectile passes close enough.
Is it possible that the projectile is set to not ignore the capsule? I don’t even know if that’s possible but if the capsule is ignoring the projectile is’t hypothetically possible that the projectile is not ignoring the capsule.