custom shapes
Posted: Tue Aug 15, 2017 11:32 am
Hi,
I am trying to create custom shapes.
To define my points, I used physics editor to create a list of points.
Result is here : .
Here below my 8 points :
((-1, 6), (5, 0), (58, 0), (63, 6), (63, 58), (58, 63), (5, 63), (0, 58))
Looks great except that I then lose collision detection as opposed to the below more "standard" shape :
((-32, -32), (-32, 32), (32, 32), (32, -32)).
How can i draw custom shapes while keeping collision detection?
Some extra details :
I am using an old chipmunk version (5.3.1) with these api's : cpbodynew,cpPolyShapeNew and cpSpaceAddStaticShape.
Bodies are rogue bodies (i.e not added to my space).
Regards,
Erwan
I am trying to create custom shapes.
To define my points, I used physics editor to create a list of points.
Result is here : .
Here below my 8 points :
((-1, 6), (5, 0), (58, 0), (63, 6), (63, 58), (58, 63), (5, 63), (0, 58))
Looks great except that I then lose collision detection as opposed to the below more "standard" shape :
((-32, -32), (-32, 32), (32, 32), (32, -32)).
How can i draw custom shapes while keeping collision detection?
Some extra details :
I am using an old chipmunk version (5.3.1) with these api's : cpbodynew,cpPolyShapeNew and cpSpaceAddStaticShape.
Bodies are rogue bodies (i.e not added to my space).
Regards,
Erwan