How can I change area of collision?

Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302
edited August 2017 in Working with GS (Mac)

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

  • IceboxIcebox Member Posts: 1,485

    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

  • Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302

    @Icebox said:

    if overlaps or collides with actor &&
    if game.playerY is > self.positionY + self.size.height/2
    then collide with player

    Excellent, this worked :) thanks!

Sign In or Register to comment.