Collision box visibility in play mode


is there a way to turn on visibility for every collision volume in play mode? With checking “Show → Collision” they are visible in the editor, but are not displayed after I click on the play button.

I attached a collision box to my character’s sword and I would like to check if its movement follows the weapon during animations or not.



1 Like

Hey Elathan , in playmode open your console ( ~ ) then type show collision
after that you should see the collision in play mode :smiley:

If i type “show collision” to the console I can see the player’s collision capsule but not the collision box I attached to the sword. I placed an instance from the same class to the map. In the editor i can see its weapon’s collision box, but in the game with “show collision” it is invisible as well :frowning:

Still does not work but I found a workaround to check if the box works in animations: in the character blueprint/viewport window it is visible, and the character plays the idle animation, I just replaced my idle with the attack animation, so i could see how it behaves - and yes, it works as I hoped it would :slight_smile:

I would not say it is resolved. The collision box is still invisible, and it would be nice if somehow there would be a way to display it.

If I use the command the collision box is still invisible.
My solution: if i uncheck the “hide in game” checkbox (Rendering), it is displayed in the game. I just have to uncheck it when I am done with the debugging :slight_smile:

console command “pixvis collision”

“pxvis collision” !!!

you can press F8 to enable some of engine’s functionality back while running the game in editor. Among other things, this allows you to see collision under show/collision category in the top-left corner of the viewport or by pressing Alt+C

1 Like

Thankyou Creo. How did you find pxvis collision - I don’t get it appearing with the predictive text of the console. Is there a master list somewhere?

// Axes
{ TEXT(“WORLDAXES”), PxVisualizationParameter::eWORLD_AXES, 1.f },
{ TEXT(“BODYAXES”), PxVisualizationParameter::eBODY_AXES, 1.f },
{ TEXT(“MASSAXES”), PxVisualizationParameter::eBODY_MASS_AXES, 1.f },

		// Contacts
		{ TEXT("CONTACTPOINT"),			PxVisualizationParameter::eCONTACT_POINT,		1.f },
		{ TEXT("CONTACTS"),				PxVisualizationParameter::eCONTACT_NORMAL,		1.f },
		{ TEXT("CONTACTERROR"),			PxVisualizationParameter::eCONTACT_ERROR,		100.f },
		{ TEXT("CONTACTFORCE"),			PxVisualizationParameter::eCONTACT_FORCE,		1.f },

		// Joints
		{ TEXT("JOINTLIMITS"),			PxVisualizationParameter::eJOINT_LIMITS,		1.f },
		{ TEXT("JOINTLOCALFRAMES"),		PxVisualizationParameter::eJOINT_LOCAL_FRAMES,	1.f },

		// Collision
		{ TEXT("COLLISION"),			PxVisualizationParameter::eCOLLISION_SHAPES,	1.f },

FPhysScene::ExecPxVis() in PhysUtils.cpp