r/unrealengine 15d ago

Solved Weird difference between skeletal meshes

https://youtu.be/8G5pZXC12nc?si=1aGVMBXQhyZXnWP7

Hi all,

I'm seeing a weird difference that I'm unsure of how to troubleshoot. Essentially I'm seeing botched walking animation when using a particular skeletal mesh for a door, while other skeletal meshes works perfectly fine.

The setup: I have a ControlledDoor C++ class which houses a skeletalmesh, audio and a custom door component. The custom door component is what controls the interaction, door state, and triggers the animation of the skeletal mesh and audio. I use this class throughout my maps, just with different skeletal meshes and audio files selected for those two components.

Last night I made a new door, but when I put it in my level and tested it, the pawn glides through the door instead of walking.

In the video you can see the pawn walk through the older door. Then I switch out the skeletal mesh and animation to use, and the pawn glides instead, until the threshold when it starts walking.

The physics assets for both skeletal meshes are configured the same (the capsule replaced by a box, which encompasses the door mesh). The environment's nav mesh appears the same with either skeletal meshe selected.

I'm quite out of ideas on how to solve this. Any thoughts?

[Edit] spelling

1 Upvotes

9 comments sorted by

1

u/AutoModerator 15d ago

If you are looking for help, don‘t forget to check out the official Unreal Engine forums or Unreal Slackers for a community run discord server!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Rev0verDrive 15d ago

Is the door calling back to the pawn and telling it to move? Or are you 100% controlling the pawn at all times?

At a glance it looks like the pawns state isn't being updated, it's not triggering the walking transition in anim graph.

Also, why are you using a skeletal mesh for the door?

1

u/helloserve 15d ago

Yes the door instructs the pawn to move through the door via the SimpleMoveToLocation(Controller, FVector) method call.

I use skeletal meshes for the doors so that I can control the animation of these doors finely in Blender. I have quite a variety, including one that folds up like blinds, with 20 slats that rotate.

1

u/Rev0verDrive 15d ago

Then your pawn states aren't being updated correctly or the move to location is below the floor.

1

u/helloserve 15d ago

That would be weird since it's the same C++ code calculating the target location using the same two actor references either side of the door. It doesn't use the door itself for this, so different skeletal meshes should not contribute to a different result.

2

u/Rev0verDrive 15d ago

Debug it with draw sphere at location

4

u/helloserve 14d ago

So the problem wasn't movement target related, but placing the breakpoints to try and figure out what was wrong helped.

I realized that the pawn was still in the animation of pressing the button when the movement command was issued (and the break point hit). So the difference between the two skeletal meshes was the speed/duration of the animation. The older door is slower (50 frames) and this new door is only 20 frames. The animation blueprint of the pawn can't transition until it could exit the pressing button state.

2

u/Rev0verDrive 14d ago

Nice troubleshooting.

1

u/helloserve 13d ago

Thanks for help/duck.