valueerror Posted April 28, 2014 Share Posted April 28, 2014 hello everybody! since one of rich's answers to the problem was to use a capsule (instead of a circle/rectangle) i tried to do this (although i don't actually understand how this could solve the problem) one problem with capsules is that it make the mentioned problem even worse (my player can now walk up walls for some reason) the main problem with this is that i don't see the physics body.. i always see a rectangle with the exact size of the sprite but altering parameters of the capsule changes the behavior of my player so i am certain it is applied correctly but not displayed. if i do this: (math.radians is a custom function to convert deg to rad) playershape = player.body.addCapsule(100,15,0,0,Math.radians(90))my player (which is 50 pixels in height) hovers about 25 pixels over the ground.. this seems to be correct because i set the distance between the two points to 100 .. it looks like this: Link to comment Share on other sites More sharing options...
george Posted April 28, 2014 Share Posted April 28, 2014 Oh there seems to be no debug method to draw the capsule! I simply forgot this back in the days. This can be seen in BodyDebug#draw, there is only support for Circle, Convex, Plane, Line & Rectangle. I will fix this as soon as I can. That's why you see the wrong shape with the correct behaviour. Regards George valueerror 1 Link to comment Share on other sites More sharing options...
toovy Posted June 25, 2014 Share Posted June 25, 2014 Hi George, I'm having the same problem. With phaser v2.0.5 I also cannot debug the capsule and the behavior is very strange. Can you please tell me about the status of the debug draw? Thanks, BR, toovy Link to comment Share on other sites More sharing options...
ZoomBox Posted June 25, 2014 Share Posted June 25, 2014 This post remind me that:Line's debug body are OK but the angle is not applied. Link to comment Share on other sites More sharing options...
Recommended Posts