Do i have to make various state images same size?
by EeKay · in Torque Game Builder · 09/28/2005 (5:50 am) · 2 replies
Hi,
I've been away for some thime on the forums because of the 1000 things in my live that avoided me from building my own game;
But since i'm back now i got a question:
I made a couple images (no animations yet) for the states standing(with nose left and one for nose right) and one for ducking, also in both directions.
I tried to use a smaller (read: not as high) image for the duck position and tried to resize the player to fit correctly. Then i noticed my character to be resized on both sides (it is made smaller on top and bottom so it appears floating higher then other objects)...
After that i just resized the image for the duck state so its height is equal to the images for the standing state. Is this the good way because it works now (it appears to be ducking instead of shrinking both ways) but i don't know if this is going to cause me trouble later on with collision detection (i dont want my character to die in a horrible whay if its ducking underneath the object, for instance hehe). Or is the PolyCustom just for that problem ?
Thanks and remember: i'm watching you all! ;)
:: EeKay ::
I've been away for some thime on the forums because of the 1000 things in my live that avoided me from building my own game;
But since i'm back now i got a question:
I made a couple images (no animations yet) for the states standing(with nose left and one for nose right) and one for ducking, also in both directions.
I tried to use a smaller (read: not as high) image for the duck position and tried to resize the player to fit correctly. Then i noticed my character to be resized on both sides (it is made smaller on top and bottom so it appears floating higher then other objects)...
After that i just resized the image for the duck state so its height is equal to the images for the standing state. Is this the good way because it works now (it appears to be ducking instead of shrinking both ways) but i don't know if this is going to cause me trouble later on with collision detection (i dont want my character to die in a horrible whay if its ducking underneath the object, for instance hehe). Or is the PolyCustom just for that problem ?
Thanks and remember: i'm watching you all! ;)
:: EeKay ::
Torque Owner Philip Mansfield
Default Studio Name
Depending on the shape of your character sprite, you might be able to use a PolyPrimitive, but when you scale them, they shrink the same amount on both sides. So shrinking it 50% in the Y direction will leave the top and bottom of the sprite without a collision detection zone. So you will need to use a PolyCustom to ensure that the players feet will still detect collisions.