Better way of Jumping Through Semi-Solid Platforms?

Hi guys, I've been following Jamie Cross' tutorials on youtube on making a basic platformer and I've noticed the way he has an actor pass through a platform is to turn off collision detection when the actor is moving up. This would normally suit my needs but I've noticed that if my actor collides with the side of the platform while coming down from a jump, he bounces instead of passing through. I hope this is making sense.

What I am basically asking is "Is there a better way to make the actor pass through a platform so that he only land on it if it is jumped on and not collided with sideways?"

If no one knows what I'm on about I can do a quick doodle to demonstrate.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @jamie_c might know. ;)

  • owen_dennisowen_dennis Just a guy, you know. Member, PRO Posts: 236

    Maybe you could put the collision in the platform and only have the collision turn on if the hero actor's Y is however many pixels above the platform?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited February 2016

    @mark_upcraft@live.com, I'm not sure I'm following what you need. I think the tutorial you are talking about is one where I show you how to jump UP through a platform from below. As you mention by temporarily turning off the players collision with the platform.

    But you mention bouncing off the platform on your way down. When the player is falling down the collision is turned back on so they don't pass through the platform. What I'm not getting is if you want the player to pass through a platform from both above and below then why have a platform at all?

    Maybe you can clarify exactly what you want to accomplish?

  • mark_upcraft@live.commark_upcraft@live.com Member Posts: 3
    edited March 2016

    Hi Owen, thanks for that, I might try that tonight.

    Hello Jamie! its ok, my description even confused me, I have done a little doodle to illustrate what I mean when I say I bounce off the platform.
    https://drive.google.com/open?id=0B9xyABaL-ZYFZU9HNHZxbUZBRHM

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    You need to add an X axis to your conditions in the similar fashion you did the Y axis.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @mark_upcraft@live.com, if you only want to allow jumping through platforms if you are ONLY jumping straight up you would do what @Lost_Oasis_Games mentions above.

    But if you want to allow angular jumping through the center of a platform like the image attached, you'd need to add another actor to the edges of the platforms to stop the jumping. This additional actor would collide with the player at all times to dis-allow jumping through the sides of the platform.

    https://dl.dropboxusercontent.com/u/17687751/example-2.jpg

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    You can give this idea a try:

  • digitalzerodigitalzero Member, BASIC Posts: 639

    OMG FINALLY SOME GOOD COMMENTS ON JUMP THROUGH PLATFORM! i have been having a hard time with this for a LOONNNGGGG while...

  • digitalzerodigitalzero Member, BASIC Posts: 639

    @RThurman hey when the actor is on the side of the platform it bounces back

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    @digitalzero said:
    @RThurman hey when the actor is on the side of the platform it bounces back

    Thats what the OP wanted. :)

  • Thanks guys I will be giving these suggestions a try tonight. Thanks again Jamie. Your knowledge of GS is pretty awesome.

Sign In or Register to comment.