I want it to look like the edge of my actor was knocked off
SamStein
Member Posts: 5
I am making a game that involves the player, basically just a square, getting pieces knocked off of it gradually making it smaller, but when I change the width, the square is shrunken from both sides so it doesn't look like a piece was knocked off. I want it to appear to have only shrunken from one side.
How can I achieve this?
Comments
@SamStein said:
You just need to move it in the appropriate direction by the appropriate amount.
You could fake this using images if you're not bothered about the hit box
This might help?
Cant post link due to forum rules but its free on DBA (search for ice slicer in our search bar).
Darren.
For example, if you decrease the width by 10 pixels then you need to move the actor to the left by 5 pixels (half of 10) at the same time. This is because the width is subtracted from each side (5 on the left, 5 on the right).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
This is the method I have been trying, but it never seems to work-out. Has anyone ever done a similar project and gotten this method to work?
It always moves just a little bit too far.
...
I can't imagine why that would be since it relies on precise math but here's a demo of the method I mentioned. Click the red square to reduce its size.
http://www.fast-files.com/getfile.aspx?file=74452
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang
Thanks! I got it to work now