Character Movement Limit - Buildbox 3

Discussion in 'How Can I...?' started by itzonator, Jun 13, 2019 at 5:06 AM.

  1. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    308
    Likes Received:
    89
    Hey boxers,

    I've been trying to figure out character movement limit on X-axis only. Since that's a 3D game and the character moves left-right on X-axis, but there's a wall and the character is passing through that wall.

    I'd like to limit the character's position when move on the X-axis so that character does not pass through the wall, do you know how to do this in BB3 (official release)?

    And yes, I've been trying to do this with Position Limiter node, but it does not work! Is there a way to restrict movement of character for X-axis? So it can move, but just a little bit within the game path.

    Thanks,
    Itzo
     
  2. weboha

    weboha Avid Boxer

    Joined:
    Aug 8, 2018
    Messages:
    183
    Likes Received:
    133
    i am using Position Limiter node its works on my game. is your character kinematic?
     
  3. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    308
    Likes Received:
    89
    Yes man, it's Kinematic. If I change it to Dynamic the game falls apart. So I need a solution for Kinematic Physics properties.
     
  4. weboha

    weboha Avid Boxer

    Joined:
    Aug 8, 2018
    Messages:
    183
    Likes Received:
    133
    yes you should use kinematic. did u add limits on node?
     

    Attached Files:

  5. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    308
    Likes Received:
    89
    I have set similar parameters with Position Limiter, it should work in general, but the game in preview is distorted and the objects are not visible on screen when I have this Position Limiter node on Actor -> Start Node -> Position Limiter. The main character is distorted and colors are flashing all over the place. Maybe this is due to the kinematic physics option. Actor cannot be dynamic due to nature of gameplay.
     
  6. Killjoy1432

    Killjoy1432 Boxer

    Joined:
    Feb 2, 2019
    Messages:
    11
    Likes Received:
    2
    I've done something similar in my game i couldn't figure out how to correctly use the position limiter node so to fix it i used the swipe 3 lane asset in the smart assets and got the same effect you can set a limit with the nodes attached to it worked great for me but only if your using swipe and not touch to move anyway hope it helps
     
  7. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    308
    Likes Received:
    89
    Good suggestion, my game is touch control.
    I have figured it out with position limiter, but partially, since my game direction is in the -Z axis I was having low number there, so I was limiting the character’s movement on the game direction so it could not move forward lol that caused the distortion and flashes of assets.

    But that is exactly what I want to do to limit position in the game direction, like in BB2, there was a game frame that can be adjusted (like we have start and end scene here in BB3), but this is missing in BB3, I guess. So instead of a value to be put to limit character movement, I think we should have like BB2 , game frame within which the character to move in that area! And this game frame can be stretched and modified with the BB3 tools (rotation, scale, move). @NikRudenko
     
  8. rizwanashraf

    rizwanashraf Avid Boxer

    Joined:
    Dec 3, 2015
    Messages:
    290
    Likes Received:
    160
    You can do something like If your Character is at X = 5 then X is equal to 5 or same for the -5 that way you can clamp the values easily. i believe! I could be completely wrong though :)
     

Share This Page