Actually I could not use the exact code from the example, because it
did not take rotation of the sprite in to account. If anyone is
interested my solution can be seen at
https://github.com/runekaagaard/data-the-game/commit/dc519eca297474dde14cbaf92e7f1ca3ae9854ee.

It is pixel perfect collision detection of a rotating sprite on top of
a level which is also a sprite. Easier than I thought!

Cheers
Rune

On Mar 18, 9:40 pm, Rune Kaagaard <[email protected]> wrote:
> Hi
>
> Don't think such a simple approach would work on my map. Found 
> thishttp://code.google.com/p/darkcoda/source/browse/sprite_collision/coll...,
> and it works fine.
>
> Cheers!
> Rune
>
> On Mar 18, 5:48 am, Winston Wolff <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > I create a Rect using director.get_window_size() for the width and height. 
> > Then I think there is Rect.contains() method to see if your ship is inside 
> > it or not.
>
> > -ww
>
> > On Mar 17, 2011, at 9:36 AM, Rune Kaagaard wrote:
>
> > > Hey
>
> > > Been toying around with cocos3d, wanting to create a Gravity Force 2
> > > (Trust, Asteroids) inspired game. So far I got the spaceship working
> > > (https://gist.github.com/874618) and am getting ready to create a
> > > level (transparent png?). How can I detect if the spaceships collides
> > > with the walls of the level?
>
> > > Thanks a lot!
> > > Rune
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "cocos2d discuss" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/cocos-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to