Announcement

Collapse
No announcement yet.

Hollow Bottom Platforms

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Hollow Bottom Platforms

    Version: 4.5.1

    Project Download 12/07/2014: Download

    (There are no binaries in this download. Only source. Double-click the 'UPROJECT' file to compile.)

    Forward: Let me start off by saying, this is probably the most bass ackwards way of approaching this. I am sure that the code can be improved, however, I ran into around half a dozen people asking how to do this with no answers. I had to ask many indirect questions to get to this (rather simple) solution. I will improve this code as I work on a little spike project for you all, a local multiplayer platform game.

    Definition: Hollow Bottom Platform - A platform that can be jumped at from any angle, and will not generate a solid collision unless the player is above it. Different from a solid platform, which will generate collision at any angle.

    Problem: This is a solution for a multiplayer platform game like SSB. You can not just switch the collision on and off with the platform using triggers, as this would affect every player. You must use collision channels on the character itself.

    Example: In this example, I use 3 collision channels.

    WorldDynamic - Is used this for the platforms. The blueprints are set to block all, and World Dynamic. There is an exclude list to make sure you are not accidentally including the player or other dynamic objects. Make sure to add the tag 'platform' to platforms.
    WorldStatic - Is all impassible objects, things like the walls and bottom platform in this example. All World Static actors will be blocked from all sides. Make sure to set any ground objects with a tag called 'ground'.
    Pawn - We want the players to still be able to run past each-other, so this is always overlap.

    I've included the project as well.

    Notes:
    * For platforms/ground objects, tick all collisions to 'block'. A 'block' only happens when both the character and the object are set to block. We are abusing this by turning on and off the 'block' of the character component.
    * Sprites will need to be added as the root object to a blueprint, otherwise collision channels will not work properly.
    * This will work with as many players as you would like.
    * This is a spike project of our main project. I will release updates on it as I go. We will be most likely using 4.5.1 as we develop, as that is the version we have locked into.
    * I swiped the Trace() function from the Wiki: https://wiki.unrealengine.com/Trace_Functions
    * Also, a big thanks to BaderThanBad, who helped quite a bit with this question.
    * Hollow Bottom Platforms are set to World Dynamic, and have a tag of 'platform'.
    * Full Solid Platforms are set to World Static, and have a tag of 'ground'.
    * Full Solids are set to World Static, and have no tag.

    There is some code commented out here and there. Just ignore that. This will be an evolving project that I update here and there.

    Search Related:
    Hollow Bottom Platforms
    Jump Through Platforms
    Traceline
    Raytracing
    Paper2D
    Last edited by The Britain; 12-08-2014, 11:45 AM.

    #2
    Reserved for updates:

    12/7/2014 - Initial example upload.
    Last edited by The Britain; 12-08-2014, 11:43 AM.

    Comment


      #3
      This is great, thanks for sharing!

      Comment


        #4
        The link aint workin' for me. Can someone reupload this?

        Comment


          #5
          Link is dead.

          This is why people should upload to github.

          Flie sharing sites are unreliable.

          Comment


            #6
            Originally posted by kumareal View Post
            Link is dead.

            This is why people should upload to github.

            Flie sharing sites are unreliable.
            The original post is three years old anyway - the engine has changed a lot in the mean time and it's pretty likely that even if you could get it to open and compile, that it wouldn't actually work anyway.

            Comment


              #7
              Originally posted by ambershee View Post

              The original post is three years old anyway - the engine has changed a lot in the mean time and it's pretty likely that even if you could get it to open and compile, that it wouldn't actually work anyway.
              You're right, I probably should redo the example since people are still finding it useful.

              Comment

              Working...
              X