PDA

View Full Version : hitbox troubles!



wolfbrother117
06-19-2014, 06:58 PM
Hi all,
While working on my top-down shooter, I came across the following problem.
I have a gun, which emits bullets (WOW, logic these days :p). Those bullets are rather small, in case that matters. The bullets are fired in a thin layer. The enemies have a thin layer attached on their "shoulders", on which is placed an impact sensor which reacts to the tag on the bullet.
The problem is, about half of the bullets pass straight through the hitbox of the enemy.They should be destroyed on impact, but I see some of them passing through the target. others however do hit the hitbox. The enemy should drop in 4 shots, but some of the bullets just seem to pass through, no matter what.
Since ammo will be expensive in the level, it will be important that every hit is a real hit.
Does anyone have a solution for this problem?

Zohnar
06-19-2014, 08:36 PM
I ran into a problem similar to this in one of my lvls. Basically it depends how fast the bullet is traveling. The faster the bullet the less likely it will destroy on contact. Try slowing them down a little, or making them bigger. Maybe you can just make the bullet longer.

ShadowArcticWolf
06-19-2014, 09:34 PM
I'm going to say it's because the bullets are moving too fast. Try slowing them down a little and see if that helps.

airide101
06-26-2014, 12:02 AM
Yes, I had a bad problem with this and had to do a lot of experimenting with it. As mentioned, one of the factors of why this happens is from the speed of the bullet, try slowing it down a little. Some other things that may help is to especially, if you can, use invisible material instead of sticker panel or hologram. Physical materials work better. Also, you can try making the Bullet/hitbox longer/bigger. So Speed, physical properties and size can play a role in this, good luck!

wolfbrother117
08-01-2014, 06:27 PM
I indeed thought of the bullet velocity, and I've already adjusted it's velocity to 20. I'll just try to make the bullets bigger wih invisible material.
Thanks for your help, and I'll give you guys an update.

Edit: Yup, now they're dropping like flies. Also, my smg bullets had the wrong color, making them completely harmless against the zombies, haha!
The big deal was indeed the size of the bullets. I made the bullet hitbox larger with invisible material, and they are perfectly registered. Thanks!
-Frank