Character moving massive objects just by walking in to them

Hi Guys,

I have a regular third person character that I don’t want to be able to move physical objects simply by walking in to them. When I do a punch animation towards a giant cylinder, where I set the weight to 5000kg, the cylinder moves like its made of paper.

Question is, is there a built in variable that hinders this interaction? I don’t want it stopped, I just don’t want it exaggerated. I want the actual weight of interacting objects to determine who gets pushed.

…bump

How are you implementing the “punch animation”? That shouldn’t move the cylinder on its own. Are you using an “Add Force” BP node, or something similar?

I’m surprised that at 5000kg your player can still move it that easily. You could try setting the angular damping. It will be under the Physics category of the mesh - where you set the mass to 5000kg. Is “Enable Gravity” checked?

Just to clarify -
Simulate physics should be enabled.
Mass in KG should be CHECKED and set to desired weight
Enable gravity should be CHECKED.
Modify your damping settings to help keep it from toppling so easily.

That should do it.

Enable gravity is checked, I increased the gravity in the world settings to -2500. My character doesn’t have simulate physics enabled, otherwise he would just flop over.

Also, I asked this question wrong. The whole reason why I asked about the issue is because when my fighter character is punching the AI, the AI’s collision is somehow being lifted up, even if I just walk in to the character, he will bounce backwards, sometimes a little bounce, sometimes thrown a couple meters.

Here is a video of the issue.

You need to disable collision between your player and AI characters.

Check the collision profile for your Character’s CapsuleComponent and also its SkeletalMesh component. You probably want the defaults (Capsule: Pawn, Mesh: CharacterMesh). It looks like you’ve changed the collision settings for the capsule component, and it’s overlapping with the AI pawn, cause it to fire “Hit” events.

If you want the punch to impart force on the AI pawn, one option is to change your player character’s Mesh component’s Collision Preset to Custom and change the Pawn response to Block.

This is probably not ideal though. You’d be better off attaching an event to OnComponentBeginOverlap and applying an impulse to the AI pawn. You then have the opportunity to do some cool stuff with physics before resuming normal animation, like this: How to do a partial ragdoll? - World Creation - Unreal Engine Forums

Why would it not be ideal? At some point I want to be able to detect what bones of the other player are being hit so I can set up the appropriate animation. I was following a tutorial using OnComponentBeginOverlap, I finished it, but the result just looked overly complicated. I was actually trying to get away from that and just have OnCompnentHit, break the result, see what bone I hit and from what direction, and have the pulse automatically applied that way with velocity blended with an animation.

That’s completely possible. Using OnComponentHit is not ideal, because OnComponentHit is really only for if you’re simulating physics, which you’re not doing. Simulating physics means a static mesh is bouncing around, etc, and a SkeletalMesh is acting like a ragdoll (or at least partially). You’re playing animations and moving characters around with player input / AI.
What you’re doing IS somewhat complicated. You should follow the tutorial you were following.

Have you reset the capsule components to their default collision profiles? They should definitely stay default.

I see, thanks for that clarification. I did reset the capsules to their defaults and that did solve the character bouncing around. Thanks again!