PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Rotate and BuildTableMask

I've noticed that when i rotate a picture, the mask didn't rotate as well. and the result is that when i do a collision checking routine, ie. a missile hitting a ship, the collision will take place on the mask but visually it doesn't make sense as the missile exploded when hitting an empty space.

Somehow it goes like this :

Image
the spaceship object

Image
the spaceship mask when built at the first time

Image
when the ship is rotated, the mask remained

Image
when an incoming missile collide with the mask

Image
a silly scene don't you think?

Can i rotate the mask as well? must i use BuildTableMask everytime i rotate a picture or is there any other way? thanks before..
That's a good point, we will look into this.

The problem is that the mask is saved on the source surface, and rotating/scaling the picture won't change this. We will probably add a new function for checking pixel precise collision on rotated/scaled surfaces.
cool.. i'll definitely look forward to it.. in the mean time, i'll just try not to use rotation too much..