Collision problem enable/disable
I have a situation where I have a sphere attached to a character's hand and I use it to detect a hit/overlap when punching. This is based on one of the video tutorials that Unreal published. My script is a bit more involved because I want to know what I hit.
For starters, as is in the video, I enable and disable the collision on the sphere based on if he's punching or not. This may be working, but in printing to the screen, I am told that the collision setting is "Custom" both when it is enabled or disabled;
The other problem is that it doesn't fire a hit or overlap when, in theory, enabled. However, if I manually set the collision in the details window to enabled, then an overlap is detected, but it is with my own character (the one throwing the punch).
Any help to resolve this is appreciated.
asked Oct 12 '15 at 05:17 AM in Blueprint Scripting
Hi, you may want to create a new collision channel, and change the settings of you punch collision, and the enemies to overlap that channel. That way it won't overlap anything but their target layer. And it will let you apply damage on to the result of the overlap without having something as your character in the way of the hit.
Here is a link to a video showing you how to set a collision channel if you need it. https://www.youtube.com/watch?v=1QuZh-C1oN8
P.S As personal advice you may want to apply damage instead of casting directly to the health of your enemy blueprints, so the cast doesn't fail whenever you don't connect and the object to cast is left empty. That's just my opinion, but the collision channel should fix you character(Or anything else) overlapping the collision.
answered Mar 18 '16 at 08:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here