Health manager on puppet
Hi, I don't know if I am doing this right. Basically I have an enemy ai puppet with a Health Manager for a shooter game.
Basically when my puppet shoots at the enemy ai, it's not damaging the ai enemy but it only registers a hit when shooting at the legs. The bullet has a health modifier that takes away the health when it's made in contact with the enemy ai. I made sure the labels marked the same but still no luck. I even tried on a solid object like a cube and it works fine for that.
How come it only registers a hit on the leg but not anywhere else on the body of the puppet?
-
Is the puppet set up in a particular way? Is the health manager simply inside the chip at the puppet's feet that comes with the puppet?
What I'm guessing is that the health manager is hitting the special collision "pill" shape, and for whatever reason, not firing. But then when you hit the legs it misses the pill shape and actually hits the legs. Unclear why it would be that way around, but it sounds like that is what's happening anyway.
To see the pill shape, tweak the puppet and go to the physics tab, then hover over the shape settings (eg. height), and it will show you a preview of the pill shape.
Hope this helps point you in the right direction. -
Hmm, I'll have a look and see if that will fix the issue.
-
Another issue to consider may arise from using the hit test logic on an actual bullet, depending on how fast it's moving.
Animation is granular. That is to say, it steps forward with each frame. So if the bullet is moving really fast, on one frame the bullet might be right in front of the enemy, and on the next frame, right behind.
This issue could be an edge case, but a more bullet proof approach (heehee) would be to use a laser scope on the gun to test for a hit, rather than the actual bullet, which would likely circumvent your current issue all together. This is a fairly standard method used in shooter games. :) -
Forgot to mention that I am also using a hitscan for the bullet as you mentioned cgCody. What's strange is that I used a block with a health manager to see if it's making any sort if effect and it worked fine. However, on the puppet it doesn't work.
-
Also the health manager is on puppet's microchip and just went through the suggestion changing physics tab and it's still not having any effect.
-
Update: Fixed the problem. Had to change the detection mode on the health modifier of the bullet to non visible which fixed the issue.
Please sign in to leave a comment.