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?
[solved] easy question - cpSegmentShapeNew()'s dont collide
-
- Posts: 2
- Joined: Tue Jan 01, 2013 6:13 pm
- Contact:
[solved] easy question - cpSegmentShapeNew()'s dont collide
Last edited by donkey on Wed Jan 02, 2013 8:18 pm, edited 1 time in total.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: n00b easy question - cpSegmentShapeNew()'s dont collide
Easy question :
http://chipmunk-physics.net/release/Chi ... hape-Notes
http://chipmunk-physics.net/release/Chi ... hape-Notes
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: n00b easy question - cpSegmentShapeNew()'s dont collide
Oh. Hrm. The docs should really also mention that you only need to call that function once when your program starts to enable segment-segment collisions.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Tue Jan 01, 2013 6:13 pm
- Contact:
Re: n00b easy question - cpSegmentShapeNew()'s dont collide
brilliant! thank you soooo much!
Who is online
Users browsing this forum: No registered users and 10 guests