No announcement yet.

Trying to recreate Smash Bros Platforms, Am i doing it right? [Working mechanic]

  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to recreate Smash Bros Platforms, Am i doing it right? [Working mechanic]

    Hello there! This is my first time doing a project without tutorials and stuff using UE!

    While the mechanic is currently working, i'm worried because is just too "buggy" it works as intented 97% of the time! So i wanted to get some feedback from more experienced developers!
    The goal is to have this sorts of Smash Bros-Like Platforms that can be overlapped from any angle but allow the player to step on them and if given the input, overlaps and drops the player character from the platform. (Hope i made myself clear! I'm a spanish speaker so is a little hard to explain)

    The way i'm currently doing this is with a player character, this Player Character spawns a CubePrefab Pawn who handles most of the logic, leaving the Player Character to receive and cast the inputs to the Pawns (4 local multi-player, not important).
    To detect and overlap the platforms i set the Pawn's channels to overlap WorldsDynamic(Platforms) and added a Box Collision to the bottom, using OnBeginOverlap it takes the decision to whether or not set the Channel of the Cube to Block or Overlap, decision taken with 3 booleans that set the SetCollisionResponsetoChannel node. Basically the Pawn will overlap all WorldDynamic unless the Box Collision detects the platform.

    Now, before posting this i had a problem with an infinite loop, problem is that apparently there was none(?), the solution was to make the Box Collision larger(?) and now works almost perfectly, Unreal's Physics Engine was kinda mad that i was calling the function that sets the Channel Response too much(?)

    Question then: (Sorry for so much text!) Is this the correct way to do it? I don't have much experience but it seems to me that i'm just forcing my way through this! Is there a better option?

    Blueprints There you can find the Pawn's Logic and the Function!

    Please check it out and call me out in whatever is wrong with it! Even the smallest correction or improvement is welcome!