Debug commands for physics controls

This question was created in reference to: [Physical animation questions with [Content removed]

I’m trying to find a combination of debug commands that will show me just the skeletal mesh body instances.

I’m trying a combination of these commands

p.Chaos.DebugDraw.Enabled 1

p.Chaos.Solver.DebugDrawShapes 1

p.Chaos.DebugDraw.Radius 1000

p.Chaos.DebugDraw.MaxLines 30000

p.Chaos.Solver.DebugDraw.ShowStatics 0

p.Chaos.Solver.DebugDraw.ShowKinematics 1

p.Chaos.Solver.DebugDraw.ShowDynamics 1

But these also show the capsule and other scene components. I was wondering if it’s possible to only see the debug draws for the skel mesh physics asset, and their state (kinematic vs simulated). I’m almost certain I’ve seen something like this in the past but cannot find the combination of commands for it.

I recall seeing a comparison between the kinematic and simulated targets overlapping. Is something like this available in the engine?

Hi, I’ve spent some time digging through the code, but I think you’ve found pretty much everything relevant with the cvars that you mentioned. There is also `p.Chaos.Solver.DebugDraw.ShowSimple` and `p.Chaos.Solver.DebugDraw.ShowComplex` that might help to simplify the debug draw if you happened to have both enabled by default in your project. But they still aren’t going to be specific to skeletal meshes. I’m just waiting to hear back from the simulation team that I haven’t missed anything - I’ll let you know what they say.

Ok, I heard back from them more quickly than I expected. It doesn’t look like there is a way to get more granular debug draw that would be specific to skeletal meshes, since we don’t have that information at the level where we’re making the debug draw calls for tri-meshes. The one thing we could possibly do in future is to differentiate based on the collision channel. But the advice at the moment is to use the visual debugger for more granular debugging similar to this, would be to use the visual debugger, since you can filter more granularly there (based on actor name, etc). We have some docs on EDC for using the CVD in 5.5 if you’re interested: Chaos Visual Debugger - User Guide for UE 5.5 | Tutorial

Thanks! I do find the CVD pretty useful. Still in runtime I’d find it useful to visually compare the kinematic and the simulated poses. This GDC talk is showing such debug draws (timestamped) : https://youtu.be/TmAU8aPekEo?t=735

I’ll go ahead and code something like this. I’m currently looking for existing code that draws the physics asset shapes. Please let me know if you know of specific functions that could help me with this that would work for runtime / packaged builds.

Thanks!

Edit:

Actually the physics control component does have a component visualizer. But it’s only visible if I eject and select the actor. I wonder if there’s a way to visualize that in runtime too?

Hello - I thought I’d chip in as what you’re asking for sounds very reasonable, and related to character control. As you say, there is an Editor-only visualizer for PCC, but it looks like we didn’t hook it up to any commands that would let you invoke it other than the default eject-and-select, so I can see this wouldn’t be useful during PIE gameplay testing.

I shall add to our list to extend this - so you can:

  • force it to be enabled
  • show collision shapes (connected to either the targets or simulated, or both)
  • use it in non-editor builds too (invoked via cvars).

I can’t promise when this will be - but we are very keen to polish the corners on this component and get it out of experimental, and I think better debugging is a significant part of that.