Hi,
I've started to use: [self.grab beginLocation:], it works fine on iOS, but on the Mac, when I run it, it moves all of my bodies off of the screen, and there location is: nan, nan.
Has anyone else had a smilier problem?
Thanks
Chris
self.grab beginLocation moves all bodies off screen
-
- Posts: 5
- Joined: Tue Jul 24, 2012 5:14 pm
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: self.grab beginLocation moves all bodies off screen
Hmm. Are you grabbing static shapes maybe? By far the most common way to end up with NaNs is to allow infinite mass objects to collide or be jointed together.
The current version ChipmunkMultiGrab doesn't automatically filter those out for you. I usually recommend using one of the layer bits or a "static geometry" group as a quick simple filter.
The current version ChipmunkMultiGrab doesn't automatically filter those out for you. I usually recommend using one of the layer bits or a "static geometry" group as a quick simple filter.
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: 5
- Joined: Tue Jul 24, 2012 5:14 pm
- Contact:
Re: self.grab beginLocation moves all bodies off screen
Thanks, I am specifying a layer in the grabber, it's just weird that it only happens on the mac version. It's the same code as the iOS version, just using the mac built chipmunk library...
-
- Posts: 5
- Joined: Tue Jul 24, 2012 5:14 pm
- Contact:
Re: self.grab beginLocation moves all bodies off screen
Just a note, no, I'm not trying to grab a static body. I'll keep digging....
-
- Posts: 5
- Joined: Tue Jul 24, 2012 5:14 pm
- Contact:
Re: self.grab beginLocation moves all bodies off screen
Ok, I'm getting closer.
I removed the libraries from the project and the headers. I then imported all of the code directly into my project so I could debug it and to my surprise I don't get any nan's anymore, and everything remains on screen, so I'm guessing the library that I built and included was misconfigured in someway. I'll keep digging.
Chris
I removed the libraries from the project and the headers. I then imported all of the code directly into my project so I could debug it and to my surprise I don't get any nan's anymore, and everything remains on screen, so I'm guessing the library that I built and included was misconfigured in someway. I'll keep digging.
Chris
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: self.grab beginLocation moves all bodies off screen
Any luck figuring this out yet? Need an extra pair of eyes to look at it?
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/
Who is online
Users browsing this forum: No registered users and 6 guests