Is it possible to get Primative Collision from UStaticMeshComponent?

~~~ Instanced PhysX Shapes ~~~

To get all of the instanced shapes of box,capsule,sphere,

I believe what you want is:



int32 SyncShapes = 0;
TArray<physx::PxShape*> CollisionShapes = YourPrimitiveComponent->BodyInstance.GetAllShapes(SyncShapes);


See PxShape.h for details

Relevant function in BodyInstance.h:



/** 
	 *	Utility to get all the shapes from a FBodyInstance 
	 *	Shapes belonging to sync actor are first, then async. Number of shapes belonging to sync actor is returned.
	 */
	TArray<physx::PxShape*> GetAllShapes(int32& OutNumSyncShapes) const;



**More Info**

**UE4 PhysX**

See my PhysX Wiki for working with PhysX code in UE4
https://wiki.unrealengine.com/PhysX,_Integrating_PhysX_Code_into_Your_Project

Enjoy!

Rama