playMaker

Author Topic: Jumping Through Platform  (Read 2036 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Jumping Through Platform
« on: August 21, 2014, 11:05:44 AM »
Hi!
I have a little problem with this.

I try to make it so the Player can jump through platforms. And it works. Almost...

Here is what I did.

On the Platform, I have a trigger at the bottom on the platform.
When the Player enter this trigger, I disable the collider of the platform and enable the collider when the Player exit the trigger. It works, BUT.......

When I jump, I use a Raycast to check if the player is grounded or not. It needs to be grounded before it can jump again. The problem is when it jump through the platform, the Raycast hits the ground, and then it can just jump again. I want that the Player needs to land on the platform, before it can jump again. So is it a way I can solve this? Hope you understand what I mean. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Jumping Through Platform
« Reply #1 on: August 21, 2014, 11:30:24 AM »
personnaly i use a trigger collider below the feet, and differents tags, so each type of platform can be recognized and splited for sounds.

for exemple:

my collider is triggering a rock object > so, my character is now grounded, and i can emit sound of rock

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Jumping Through Platform
« Reply #2 on: August 21, 2014, 12:11:07 PM »
Hi!
So, then you use this trigger to Jump Through Platforms? The problem is when you jump through a platform, the trigger you have below the feet will detect the ground and you will be able to jump again before you land. That's my problem.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

blackant

  • Hero Member
  • *****
  • Posts: 521
  • http://blackantmaster.com
    • blackantmaster.com
Re: Jumping Through Platform
« Reply #3 on: August 21, 2014, 01:16:20 PM »
i use a wait time of 0.1 when i add force, just the time needed for the character to jump