Page 1 of 1

Rotate and BuildTableMask

PostPosted: Jun 7, 2006 @ 8:11am
by Nic-Gun
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..

PostPosted: Jun 7, 2006 @ 2:52pm
by edge
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.

PostPosted: Jun 8, 2006 @ 2:30am
by Nic-Gun