How can I re-size my collision box?
Jigglebox
Member Posts: 63
I have multiple actors that have effects happen when they collide with each other. However, the collision areas around each of these actors are much too large for the image I am using with them...
I've been searching for an answer for this for several hours now and unfortunately I'm getting frustrated with myself for not being able to find it.
If the original creation of the images used is a factor then here is some info on that.
each image is created in Photoshop on a 2048x2048 plane with 300 pix./in. I deleted the background on all of the images i am using and only have one layer just to make sure there is no background unseen images.
When I apply the image into GS It SAYS the image is 2048x2048, but until I re-size it, it doesn't show the actual numbers.
Please help if you can. =[ getting very frustrated as I have been working on this for several hours now.
I've been searching for an answer for this for several hours now and unfortunately I'm getting frustrated with myself for not being able to find it.
If the original creation of the images used is a factor then here is some info on that.
each image is created in Photoshop on a 2048x2048 plane with 300 pix./in. I deleted the background on all of the images i am using and only have one layer just to make sure there is no background unseen images.
When I apply the image into GS It SAYS the image is 2048x2048, but until I re-size it, it doesn't show the actual numbers.
Please help if you can. =[ getting very frustrated as I have been working on this for several hours now.
Best Answers
-
tatiang Posts: 11,949Save your images as 72dpi (see http://www.jamie-cross.net/?portfolio=gamesalad-recipe-002-graphics-and-animation).
Are you cropping your images so that there is no extra space around the visible area of the image?
A circular collision actor will have a circular collision area.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
-
FallacyStudios Posts: 970Honestly the best method in which to get highly accurate collision boxes is to make it yourself. Save your main actors X and Y coords as Game Reals. Then have the collision detection inside the actor your player collides with.
If game.PlayerX >= self.positionX-40 AND game.PlayerX <= self.positionX+40
Same with Y... it creates your own collision box you can control where the collision happens rather than just having it be the generic GS collision detection which collides with the outsides of your image.
Answers
Sorry for the late response, with the way I am saving them right now I shouldn't need to crop anything because I simply have the object with no background. I still need to save it to 72dpi but I will deff go check out Jamie's guide on this. Thank you for the answer.
If you however had a character that had excess room in the image that was just transparent and wanted the collisions to be more precise, this is how you would go about it.