I have a long (near 3 meters) skeletal pawn mesh that can move correctly on the flat ground but gets broken on the uneven surface (mountains etc.) (either lifted into air or sinked into the ground). How to fix this without breaking animations?
The collision capsule inside the pawn is colliding with the ground, but if your skeletal mesh is bigger than the collision capsule, then you need to compensate for that.
First I strongly suggest you to add collision capsule so that the entire skeletal mesh will be inside them, otherwise you’ll end up clipping with most of the body inside something that you should collide with.
Second use tracing to manage the height of your skeletal mesh, by using IK or Spine//Fabrik nodes inside ABP/Control Rig.
I’m not sure which one could work for you, since I don’t know if your skeletal mesh is a snake, mechanical mesh, or something like that, but using tracing should solve your issues and take into account the height difference for the front/back body parts.
Hello @Enter_Reality! What means “using tracing”? It is something other that line trace? If yes, can you provide a link for the tutorial to this “tracing”
Line Tracing in ABP or Sphere tracing if you’re using Control Rig.
Yes, I can do the line tracing, but what to do next to bind the mesh to the ground? Can you show an example?
I also encountered the same case, if you can fix it please help me, thanks a lot
Can you share a picture of the skeletal mesh, so that I can see how it’s built?
@Enter_Reality, here is the skeleton tree:
A strange skeleton, I’d say. Unfortunately, sharing the picture of the mesh itself is forbidden.
Honestly without a reference picture is hard to understand what’s going on, but I supposed is a quadruped with a tail.
Yes, so it is.
Based on that you can do the following using Control Rig:
- For the area near the pelvis, you can use a setup similar to Lyra’s character lower body, where the sphere tracing is done by the IK joints on the feet, then the pelvis is lowered by checking which foot is the lowest. The entire thing can be found inside Lyra’s project available from the launcher.
- For the “upper body” of your character you can do two things:
- You can have a sphere tracing from the torso joint ( the ribcage joint I see in the hierarchy maybe ) and use a Fabrik node to drive the entire spine via IK, so that the ribcage joint can take into account the tracing on the terrain and lower the upper body affecting also the entire spine, then use standard IK for the forward paws.
- You can use the same setup described for Lyra’s lower body, so basically the tracing from the forward paws, then use the lowest value to also lower the torso accordingly.
- For the tail, I would use maybe 2-3 sphere tracing ( tail3, tail6 and tail 8 ) and again using Fabrik you can check the distance from the terrain and rotate the joints accordignly, but I would do that only when the tail is clipping the terrain, otherwise you can just have the tail having the same orientation as the lower body, maybe with some secondary motion on top of it.
I assume that the lower body/pelvis of your quadruped inside the BP is at the center of the capsule, correct?
Can you provide a link to it?
Probably near that.
Lyra Starter Game
Thanks, I will try.
Hello again @Enter_Reality! I see the following control rigs in Lyra Starter Game pack, which of them do I have to use?
If I recall correctly is the one called Foot Plant.
Once open study everything that is in there, so that you can understand what’s goin on.
If you’re struggling with understanding the setup, I also do consulting, so eventually get in contact via DM.
Unfortunately, I am not seeing the Foot Plant there, maybe you meant Foot?