Can Anyone Help Solve My Physics Problems?

Hi everyone! =)

Basically I got two problems which are driving me crazy and I’ve watched countless Youtube videos and read Unreal docs but none it is working for me! =(
God knows, I must’ve spent about 35 hours on this over 3 days.

My first problem is that when I shoot my Ragdoll enemy mesh it flies up into the air and miles down my city street.

My second problem is that I get wierd limb stretching when the enemy ai has been shot and lays on the ground.

If anyone could help me I would be eternally grateful and give you a massive shoutout in my credits when production is complete! =)

Thanks for viewing everyone.

https://forums.unrealengine.com/development-discussion/animation/91949-ragdoll-torso-stretching-away

After reading this and being Obviously and Utterly brand new to the new UE4 engine, I would have to agree that it most likely stems from improper joint connections. Maybe you have a centered piece that isn’t reacting well to the physics. This could also account for the weird limb-stretching you mentioned. If the point of “impact” isn’t the same as what the engine expects to encounter, it would do really weird things.

Check your parenting, I’m fairly sure that’s the issue.

Hi! So I guess most people who start with UE have to face this dilemma. It is related to the collision setups of the character capsule and the mesh, and enabling physics for ragdoll.

Communicating to the AnimBP that the character is dead. To trigger the bool setup an Interface, add a function with a bool value, and add the Interface under Class Settings for that character and inside the AnimBP. AnimGraph blend Pose by Bool, to avoid movement glitches. The dead anim pose is just a 0 frame animation, without any movement, ie. a standing player mesh.

Setting the collision response channels OnDeath function

Setting the Mesh to collide with physics.

Destroying attached actors who are no longer needed, also to avoid performance issues if player respawns, and setting the AnimGraph bool for the dead pose, as mentioned above.

Special collision channel setups


Above is largely based on the Character Interaction pack from ZZZGertZZZ Character Interaction in Blueprints - UE Marketplace - uses a rather not so convenient collision setup, which turned out to work perfectly for me. Though notice that this requires to have EVERYTHING potentially overlapping the player has to be setup accordingly. This could even mean to set default system volumes collisions. Basically each time you place something into the level which may overlap the player, take a look at the collisions.

The main two collision I use is Trigger for everything which should/can be triggered by the player, hence the collision spheres/boxes need to be set to overlap with pawn, and or check for player to avoid AI triggering, and the player character capsule (which is set to Pawn) has to have overlap with Triggers.

I setup custom collision channels, such as System or Misc, for things like Foliage generating volumes, or Water related volumes, or even the Navmesh. One more point to note, if you add/edit custom collision channels, this may effect the sorting order of the entire collision channels in each asset, and editing a base actors collision automatically sets these values in all child actors.

So maybe this is helpful, as it was to me.

@**unit23**HI! I really appreciate you showing me this. It looks like what I need to get it working. Could you please break it down for me in simpler terms please because I am new to UE4. Like I said I really thank you for spending the time and getting back to me. I just wish it was a bit easier to understand. THX btw! =)

Thanks for the help but is there a simpler way to achieve this without relying buying assets off Marketplace.

Sorry if this was clear but you do not have to buy anything, the approach I use is outlined in detail above. Sorry I am too busy atm to break it down further, but if you have specific questions ask here, and also quote me briefly so that I get a notification.

unit23 Quote—> Communicating to the AnimBP that the character is dead. To trigger the bool setup an Interface, add a function with a bool value, and add the Interface under Class Settings for that character and inside the AnimBP. AnimGraph blend Pose by Bool, to avoid movement glitches. The dead anim pose is just a 0 frame animation, without any movement, ie. a standing player mesh.

Do you want me to create a bool varible in the character blueprint? And then search for it and select it in the Anim BP? Should I get a laying face down on the ground dead animation to set the 0 frame animation?

Thx! =)

Hi unit23! =) I have a slight problem. I don’t get what “Is Dead” is it the name of your bool function value? THX!

“Set is dead” what is the exact name of this node because I can’t find anything called set is dead. I’ve tried unchecking the box in the top right of the search query to get more results and it wasn’t there. I think maybe that’s what you called the node? Could you please tell exactly what to search for to get this node? Cheers now! =)

Thx for the heads up! Please view previous posts for new posts. Not too sure whether you got them! Thanks man! All your help is appreciated! =)

Since I was a little unclear as too what you were instruting me I’ve had a workaround and this is what I’ve done. Probably done it all wrong but oh well I tried. Good news though my Character no longer has the limb stretching thing going on anymore! =)

Please below for pics of what I’ve done! =)

These pics are my Character Blueprint (in two parts) and my Anim_BP (Also in two parts)

What exactly is the problem, with the changes you made? Do not destroy the mesh or capsule…

Hi!

Basically my enemy character is laying on the ground when I start the game. I used set animation with the death animation selected but you used something called “Set is dead” and the target is hooked up to anim instance bp. What do I search for to get “Set is dead” and the Anim instance BP for the target?

Also, in AnimGraph you have something called “Is Dead” attached blend poses by bool in the active value pin. What is “Is dead” and how do I find it to select it?

Thanks for all your help, I’m nearly there just need a little more help. =)

IsDead on AnimGrap is an extra addition, more sophisticated and helps to avoid glitches. So you have to only set this when the bool is true, as shown in my screenshot.

To set up a DeathAnim:

Create a Blueprint Interface with a bool.
Add the Interface to your character blueprint and AI Master blueprint (or if you use different AI blueprints to those you want to have this feature) If you search for that function type Message MyInterfaceFunctionName.
Add the Interface to the character AnimBps
Where you call your Death function make a interface call to that interface function with the bool set to true.
Inside the AnimBP add Event MyInterfaceFunctionName and set a bool accordingly

I recommend to use the default stand animation because once you enable physics for your character mesh, the mesh should just respond to physics input, ie. gravity force, or physics impacts. If you use a character floored. However, I did not test with a ground pose, so this may or may not be importent.

IsDead is just a bool variable name you set once your character has this state, it can be called anything you like.

Also you likely have to communicate this to your PlayerController, hence add a Branch on EventTick, to check if the PlayerCharacter has this bool set or not. Additional you have to run this only once with a DoOnce node (which you reset on Respawn, once IsDead is False).

The entire thing with AnimGraph is to improve the visuals, it is not required per se. Is your initial issue solved, with the characters flipping around?

Hi unit23! Thx for the post! I’ve tried searching for "Message Myinterface and “Event Myinterface” but nothing shows up. I’ve tried these searches with and without context sensitive box checked.
Have you got any ideas why it’s not showing up? I’m using Unreal Engine 4.20.3 as it won’t let me update the engine.

Thanks for all your help mate it’s greatly appreciated. Cheers!

Best wishes and kind regards, Glyn.

The Message Myinterface is corresponding to the name you gave to your Interface Function, so if your Interface function is called SetDeathPose you search for Message SetDeathPose.

I’ve created the interface but nowhere on the interface can I find how to create a bool value. What am I doning wrong mate? =)

Yeah I figured that out in the end. I was having a blonde moment! =)

I’ve created the interface but nowhere on the interface can I find how to create a bool value. What am I doing wrong mate? =)

The Interface Function panel contains an Input and Output node

Hi unit23. I’m really sorry this is dragging out but I’m stuck. Below are some pics.

My interface is called Ragdoll_Fix. I don’t think i’ve set it up right if you take a look at the pics. And when I search for Event Ragdoll Fix in AnimBP it doesn’t show! I am so confused but I really appreciate you sticking around to help. I know that with your help I can do this. Thanks for all the support! =)