Hello All,
I'm new to Chipmunk and relatively new to Objective C, but have been developing for 16 years....so I'm not a complete n00b. I will try to frame my question in the best way that I can.
I have been playing with the example code that was published online at:
http://www.alexandre-gomes.com/articles/chipmunk/
I have been able to make complete sense of the entire sample, but when I port the code to iPad, I have had to trick Chipmunk into understanding the 768x1024 screen resolution by using negative Y coordinates. For example if I try to add a static shape to my space, I have to set its initial position to something like -560 to have it hit the bottom of the screen.
Is there some configuration I need to set in the source/core files that defines my screen resolution?
Thanks...
John
Device Resolution Question
-
- Posts: 2
- Joined: Thu Aug 04, 2011 3:11 pm
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Device Resolution Question
Chipmunk just works with absolute coordinates. It has no idea how you are rendering anything.
You'd have to figure out how the tutorial is rendering it's stuff and change the coordinate system so (0,0) is in one of the corners of the display.
You'd have to figure out how the tutorial is rendering it's stuff and change the coordinate system so (0,0) is in one of the corners of the display.
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: Thu Aug 04, 2011 3:11 pm
- Contact:
Re: Device Resolution Question
That is starting to make sense now...slembcke wrote:Chipmunk just works with absolute coordinates. It has no idea how you are rendering anything.
You'd have to figure out how the tutorial is rendering it's stuff and change the coordinate system so (0,0) is in one of the corners of the display.
Thanks!
Who is online
Users browsing this forum: No registered users and 13 guests