Jump to content

P2 physics semi circle body


andersthorborg
 Share

Recommended Posts

Hi there,

 

I am new to phaser and to test it out I am recreating the old SlimeSoccer Java-browser-game. (http://slimegames.eu/soccer/)

 

h9CIs.png

 

I've implemented it with P2 physics and generally it is working pretty well.

 

However I am having a difficulty with making the body of the "players" behave properly when colliding with the ball. So far I haven't found a way to create the semi circlular shape with phaser/P2? Is it correct that this is not possible - that it is either a full circle or a polygon? I have created a polygon with a lot of points to "simulate" the circular shape, but it doesn't work as intended. I've tried actually making circular bodies to test the physics and that works great, except they should be "cut in half".

 

Does anyone have a clue to how to approach this?

 

Thanks!

 

Anders

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...