[solved] easy question - cpSegmentShapeNew()'s dont collide
Posted: Tue Jan 01, 2013 8:34 pm
Hi all, this is my first use of chipmunk so I apologise if this is so basic. I hope it is, because it means a quick and easy answer!
Ok so I see in the demo app that comes with chipmunk (i am using v6.1.2) and I am building for OSX using xcode, that some of the demo scenes use cpSegmentShapeNew(). For example I draw your attention to "springies.c". The add_bar() function actually uses cpSegmentShapeNew().
Now all I am trying to achieve, is to make these 'bars' collide... I can't...
I've tried layers, groups, collision_type and can't get the shapes to collide. All debugs seem to suggest that these variables for the shapes are all set to default. In fact I can't even get them to collide with the static walls.
Now the minute I change cpSegmentShapeNew() and say use cpBoxShapeNew(), bang it works. The shapes collide with each other and the static wall. These box shapes actually collide with the segment shapes too! (thats doing my head in a bit).
Any thoughts for a first timer here?
Ok so I see in the demo app that comes with chipmunk (i am using v6.1.2) and I am building for OSX using xcode, that some of the demo scenes use cpSegmentShapeNew(). For example I draw your attention to "springies.c". The add_bar() function actually uses cpSegmentShapeNew().
Now all I am trying to achieve, is to make these 'bars' collide... I can't...
I've tried layers, groups, collision_type and can't get the shapes to collide. All debugs seem to suggest that these variables for the shapes are all set to default. In fact I can't even get them to collide with the static walls.
Now the minute I change cpSegmentShapeNew() and say use cpBoxShapeNew(), bang it works. The shapes collide with each other and the static wall. These box shapes actually collide with the segment shapes too! (thats doing my head in a bit).
Any thoughts for a first timer here?