Character Movement Limit - Buildbox 3

Discussion in 'How Can I...?' started by itzonator, Jun 13, 2019.

  1. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    358
    Likes Received:
    101
    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:
    194
    Likes Received:
    138
    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:
    358
    Likes Received:
    101
    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:
    194
    Likes Received:
    138
    yes you should use kinematic. did u add limits on node?
     

    Attached Files:

  5. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    358
    Likes Received:
    101
    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:
    15
    Likes Received:
    3
    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:
    358
    Likes Received:
    101
    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:
    295
    Likes Received:
    165
    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 :)
     
  9. tonymartz2

    tonymartz2 Boxer

    Joined:
    Jun 9, 2016
    Messages:
    98
    Likes Received:
    21
    same issue here my game is moving an an x axis at 5, I set up an invisible box using position limiters so that the actor stays within set perimeters. the Z limiter works fine for left and right, however the front and back limiter do not scroll with the gameplay that is moving on the X axis at 5... is this a glitch or am I doing something wrong?
    what's happing is that as game starts to move forward on the X axis the invisible barrier pushes the actor down to the bottom of the screen.
    can't figure out how to make limiter move with game it self..
    my actor is kinematic
     
  10. itzonator

    itzonator Avid Boxer

    Joined:
    Dec 18, 2017
    Messages:
    358
    Likes Received:
    101
    I was able to figure it out when playing with Position Limiter parameters. Try everything from 1 to 999 from -1 to -999 on each axis and see how it would perform. It's really gameplay-dependent. I figured it out when added the number 9999 for z-axis in Position Limiter and it worked, you may need to have different adjustments :D

     
  11. tonymartz2

    tonymartz2 Boxer

    Joined:
    Jun 9, 2016
    Messages:
    98
    Likes Received:
    21
    tried it all with no luck, it seems like I can get the X axis limiter to work.
    I created the desire "virtual fence" but it does not move with the game play on the X axis... that fence/limiter goes off screen as the game play moves forward.
    i can't get it to move with the actor to maintain those set parameters. the Z axis works find and the Y is not required for my game...
     

Share This Page