OpherV Posted May 5, 2014 Share Posted May 5, 2014 Is there a way to have an ellipse body in P2? Link to comment Share on other sites More sharing options...
george Posted May 5, 2014 Share Posted May 5, 2014 No. There is onlyCapsuleCircleConvexHeightfieldLineParticlePlaneRectangleShapeYou can find such information yourself by browsing the source of p2.https://github.com/schteppe/p2.js/tree/master/src/shapes Regards George Link to comment Share on other sites More sharing options...
OpherV Posted May 5, 2014 Author Share Posted May 5, 2014 What's a capsule? Link to comment Share on other sites More sharing options...
george Posted May 5, 2014 Share Posted May 5, 2014 Think of Dr. Mario A rectangle with a half of a circle on each side I guess. I really do not know why this is a special shape in p2.. Link to comment Share on other sites More sharing options...
CtlAltDel Posted May 5, 2014 Share Posted May 5, 2014 It's a special shape because capsules are usually used for representing characters in games. The rounded bottom makes it easier to get up slopes etc with physics. The equivalent is also used in 3d games. george 1 Link to comment Share on other sites More sharing options...
george Posted May 5, 2014 Share Posted May 5, 2014 Thanks! Did not know about this. Link to comment Share on other sites More sharing options...
tips4design Posted February 13, 2015 Share Posted February 13, 2015 This shape doesn't seem to show while the body debug is on (rectangle and circle display their debug shapes ok). Link to comment Share on other sites More sharing options...
Recommended Posts