This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Rotate and BuildTableMask


Rotate and BuildTableMask

Postby Nic-Gun » Jun 7, 2006 @ 8:11am

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..
User avatar
Nic-Gun
pm Member
 
Posts: 61
Joined: Apr 7, 2005 @ 6:50am
Location: Jakarta, Indonesia


Postby edge » Jun 7, 2006 @ 2:52pm

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Nic-Gun » Jun 8, 2006 @ 2:30am

User avatar
Nic-Gun
pm Member
 
Posts: 61
Joined: Apr 7, 2005 @ 6:50am
Location: Jakarta, Indonesia


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron