How can I change area of collision?
Simple Gamer Arts
Member, PRO Posts: 305
I have the jump-through-platform formula going; the thing is, when my actor makes ANY sort of contact with the platform (mid air, lets say), it effects an attribute that I ONLY want to be effected when the BOTTOM of my actor's feet are on the TOP of the platform.
So, I would like the BOTTOM of my actor's feet to ONLY make a collision/contact effect with the TOP of the platform... In other words, when my actor is jumping through the platform in mid air to eventually land on it, the collision effect should not take effect just yet, only until the BOTTOM of my actor's feet make contact with the very TOP border of the platform.
Any suggestions? THANK YOU!
Comments
You can do
if velocity.y is <= 0 collide
or you can constrain real game attribute to y position of the player and have a rule on the platform
if overlaps or collides with actor &&
if game.playerY is > self.positionY + self.size.height/2
then collide with player
Excellent, this worked thanks!