Collision not sensing when my character is on ground.

FatalCrestFatalCrest Member Posts: 113
edited November -1 in Working with GS (Mac)
Hello all and thanks for those who help me,

So, here is my problem, when my character jumps and lands back on the ground occasionally my character's onGround attribute won't change back to true. How do I know? My Jump Function is based on the onGround attribute true to jump. Anyone have an idea why this is happening?

Comments

  • FatalCrestFatalCrest Member Posts: 113
    (Note nevermind about my edit earlier)

    It started happening again, I need help, I've tried making a rule where when my guy lands, it changes the jumpTrigger back to 0 but, sometimes if I hold down the button to the point where my character lands, it still thinks jumpTrigger = 0
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Does the "ground" always have the same y position? If so, you can make your rule check for the actor to go below a certain point.
  • EastboundEastbound Member, BASIC Posts: 1,074
    Try putting your character on a different layer with a higher position than the layer the ground is on. I've found this can help collision detections, but I have no idea why.
  • peachpellenpeachpellen Member Posts: 977
    In the templates when you go "new project" there is a little blue dude one jumping about collecting keys.

    I used it last night, copying the rules, etc. to make my first game that required the ground collide.

    Try that; it worked perfectly for me. :)
  • FatalCrestFatalCrest Member Posts: 113
    Sorry for the late reply, I've been working on other functions on my game lately, I'll try what you guys said Thank You. ;D
  • ORBZORBZ Member Posts: 1,304
    Collision rules are tied to the physics "movable" attribute. If your actors are not "movable" then the collision detection is less precise since the engine assumes that unmovable actors don't collide with each other. If your main actor is movable and it collides with a non-movable actor it should still work though.

    I'm assuming your ground is not movable and your main actor is movable. In that case it should work most of the time. To increase collision checks make the ground and the main actor movable. HOWEVER, then you need to figure out a way to make the ground remain locked into one place so as to avoid drift when it gets hit. Ugly solution either way you look at it.

    High velocities of objects can also pass through each other due to GameSalad's lack of bullet physics.
  • FatalCrestFatalCrest Member Posts: 113
    Thanks for letting me know ORBZ, I'm still looking for a good way but, I'm taking my time. :D
Sign In or Register to comment.