Request: void * data on cpSpace

Discuss new features and future development.
Post Reply
User avatar
pat
Posts: 53
Joined: Tue Jul 20, 2010 7:55 pm
Contact:

Request: void * data on cpSpace

Post by pat »

Hey there, This is something i think could be useful. Basically i'm accomplishing this now through cpSpace.staticBody.data but i really don't think it would hurt much to have a void *data member in cpSpace. I'm using the void * data in cpSpace.staticBody.data just to tie the game class in. So i can just cast it to that during things like collision callbacks. Using the void*data in staticBody works for now, but if i actually moved to tieing things into body's data member it would be a pain, but i'm not saying i'm planning on doing that either. Just thought maybe this would be ideal for most people.

I've been playing with the idea of having multiple spaces too, So it could help here as well.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Request: void * data on cpSpace

Post by slembcke »

Actually I was just thinking about this yesterday. Added to the TODO list.

I just got the changes ready to push out for 5.3.2, so it'll have to wait for the next version though.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
pat
Posts: 53
Joined: Tue Jul 20, 2010 7:55 pm
Contact:

Re: Request: void * data on cpSpace

Post by pat »

awesome, no hurry.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests