This content originally appeared on DEV Community and was authored by Maciej Sawicki
Today I started working on people receiving damage. My vision is that when the Drone drops a granade and a person is in a close proximity of its explosion it should react naturally. If it's close enough they should loose their legs, arms, hands, etc. So I searched for tutorials and it turns out there are not that many. The remaining ones are very complex or for Unreal 4.
The one I found looking the most interesting is https://www.unrealengine.com/marketplace/en-US/product/procedural-dismemberment-system. It costs about 43 dollars, it's not that much compared to other products on the marketplace. I have not bought it yet. I need to sleep with it.
In the meantime I needed to somehow detect which bone the projectile hits, so that it can be dismembered. I started with a simple shooting projectile that only prints the bone it hits.
At first I had problems, because the FirstPerson content pack did not detect any bones. It turned out to be that the character collision capsule ate all the collisions. To make it ignore collisions with bullets I learned that you can create custom Object channels.
So I created a Projectile
channel. Then each projectile was assigned to be a Projectile
and then the collision capsule on a character was setup to ignore a collision from a Projectile
.
And below is a result, where in the top left corner I can print the bone the projectile hits.
This content originally appeared on DEV Community and was authored by Maciej Sawicki
Maciej Sawicki | Sciencx (2024-07-06T22:59:39+00:00) [Game of Purpose] Day 49 – Bone collision detection. Retrieved from https://www.scien.cx/2024/07/06/game-of-purpose-day-49-bone-collision-detection/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.