so i’m trying to make a punch for my game were a box Collison parented to an arm. what’s supposed to happen is that when i punch the actor it’s supposed to ragdoll, thanks to the box collision but it doesn’t work. how can i make a box collision in my player character to cast to the actor to make it simulate physics.
Hi
If you are activating physics AFTER the actual punch then no force is generated to ragdoll the player.
So when the receiving actor has the collider overlap then activate its physics and apply a force at the point of collision in the direction of the punch.
Use Add Force or Add Impulse play with the 2 until you get what result you want
I’m not doing that, i’m using a box collision to cast to my actor to then simulate phisics
im not sure what you mean? You have just said the same thing that i was describing how to do, unless you are not describing the problem correctly or i misunderstood?
You say you want to simulate a punch, using a box collider, then the box collider needs to be blocking and the receiving actor needs to have physics enabled and switched on before you hit them. Or you detect the hit of the box collider on the other actor and use either of the 2 examples i have given.
You cant cast a collider to an actor. so Im not sure im getting what you mean apart from, punch , punch hits, apply physics. either way you need to have physics enabled before the hit and the collider to be blocking. or you need to switch it on at the point of contact and simulate the hit as described.
sorry for confusion
but i did it
Its fine not everyone can articulate their needs clearly everytime, me neither. Be nice if you explain what your fix was so anyone else looking with a similar issue can benefit!