Combination of sprite collision modes?

Started by thaaks, September 01, 2005, 04:40:12 AM

Previous topic - Next topic

thaaks

Is it possible to detect if sprites collide with the world (SpriteCollisionMode 4 or 5) and at the same time with another sprite (SpriteCollisionMode 0 to 3, depending on required collision "precision")?

My first guess would be "not possible" given that the modes are not powers of 2 and so are not "Or"able.

Are there maybe other ways to check if a sprite collides with the world or with another sprite using the builtin collision mechanisms? GetSpriteImpactObject will return a world thingie if SpriteCollisionMode is 4 or 5, so this would not help I guess.

I am aware that I could code my own rectangle/circle/shape collision routines that check for sprite-sprite collision. I would then use SpriteCollisionMode 4 or 5 to assure that my sprites stay in my world.

Hints and tips highly appreciated,
Tommy

kevin

QuoteIs it possible to detect if sprites collide with the world (SpriteCollisionMode 4 or 5) and at the same time with another sprite (SpriteCollisionMode 0 to 3, depending on required collision "precision")?

 Not in a single command.  Although modes 4 or 5 are = to circle mode.  

So using SpriteHit etc will use the sliding regions radius as the hot spot.


QuoteAre there maybe other ways to check if a sprite collides with the world or with another sprite using the builtin collision mechanisms? GetSpriteImpactObject will return a world thingie if SpriteCollisionMode is 4 or 5, so this would not help I guess.

 For sprite to sprite stuff use,

 SpriteHit(KeySprite,FirstSprite,Class)  

 SpriteOverlap(Sprite1,Sprite2)

 To handle both,  you could toggle between modes, between compares.. (so all the sprites would be set to their inter sprite mode by default) then toggle it to world mode when you move it and back again..  Although I'd prolly use a dummy sprite for movement.. Much of much ness really.