Page 1 of 1

How to create an arc shape?

Posted: Fri Jan 02, 2009 7:07 pm
by wenshu
I want a static arc shape (portion of circle), but I cannot find how to do that in document, any idea?

Thanks

Re: How to create an arc shape?

Posted: Sat Jan 03, 2009 8:44 am
by maximile
You can't. The best you can do is approximate it with lots of faces on a polygon or line segments.

Re: How to create an arc shape?

Posted: Tue Oct 13, 2009 4:12 pm
by mobilebros
Just curious if anyone has any insight on why simulating an arc shape would be hard. It "seems" easy enough: recognize as a circle but with extra checks against angle and distance (I realize this functionality is not in chipmunk... yet); anyone?

Re: How to create an arc shape?

Posted: Tue Oct 13, 2009 4:47 pm
by zaerl
1) Create a cpCircleShape
2) Create your own collision callback in which you return 1 only when the collision normal is contained in the arc

cpCollFunc contains all the informations you need.