Collision enabled not working

Hello!

I have two sphere collisions placed on the hands of my third person character, when I click the left mouse button I want the collision of the two sphere collisions to be turned on and then afterwards to be turned off. The code I have doesn’t seem to work, and I have no idea why it isn’t working either. Thanks for any help!

The code I have doesn’t seem to work

How do you know it does not work? How are you testing it?

I meant the Cast Failed - yeah, place a print string there - does it print?

My assumption here is that you’re approaching another actor that is of Third Person Character class, right?

What is your expectation when the collision occurs? The health goes down. Does it print the new, reduced health value?

Hi, I’m sorry I’m quite new, how do I check that? should I connect it to a print string?

If I connect it to the True then it works but the sphere collisions collide with the owning capsule.

When I connect a print nothing prints out. Yeah so I basically want the health to go down when the sphere collisions collide with the other third-person character capsule, it works when I don’t add the enable collision but I need that because I want it to only collide when my character punches, for example, pressing the left mouse button.

Thank you so much! I’ll try this now and see if there are any differences!

I have (very crudely) replicated the above setup and gave the TPC a giant fist:

Image from Gyazo

Double check those settings and see if you can spot the difference.

Hm, not sure. I’ve now hid the collision sphere inside the character mesh and set it to 1uu only - and for as long as it overlaps with the Pawn (the capsule, to be precise), it does trigger.


Did you modify the collision settings of the character mesh or its capsule by any chance? Because the sphere also needs something to collide against.

I found the difference. I have my spheres under my mesh so it will move with it, I saw that you had it outside so I took mine out and it works. Do you know why that would be causing the problem and how to fix that? Because I want the spheres to move with the hands, and thank you so much!!!

I can check, I have most likely done that if it works for you.

I have set my mesh to ragdoll I guess, do you think that could be the problem?

Update: I put them back in and they worked but when I set the location to be the same as the hand it stopped working, when I set a parent socket location

I have no idea how to make it follow the hand and work at the same time, weird that it’s not working when it is parented to a socket

Not sure. I tested it parented to the a socket, pinky I believe.