Any way to limit collision to Y only?

dusker24dusker24 Member Posts: 30
edited November -1 in Working with GS (Mac)
Hello,

I'm writing a game where the hero jumps up and I only want to bounce on the up movement. Is there an easy way to only do a hit check on the actors head going up?

Thanks

Tom

Comments

  • m456arcusm456arcus Member Posts: 189
    Try a rule saying, If self.LinearVelocityY is more than 0, collide. I believe that should work.
  • marksmarks Inactive, Chef Emeritus Posts: 14
    Dusker,

    If I understand you correctly, you're trying to figure out if top of the actor's head hits the underside of some object or platform, but you don't want the actor to collide with the object when falling through it from above?

    Try putting the collide behavior into a rule - if actor's Y position is less then or equal to the Y position of the object you want it to fall through, collide.

    Hope that helps!
Sign In or Register to comment.