Announcement

Collapse
No announcement yet.

Restrict Z Level

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

    Restrict Z Level

    I've created a flying pawn with 4 degrees of movement (up/down and left/right) following Epic's Six-DOF flying pawn tutorial with collision enabled. A question I had is how to restrict my character's Z level from moving either up or down in Z level from outside effects such as collisions. I do not want my character to ever ascend or descend, I would like to lock my character to a single Z level. How would I go about doing this via blueprints?

    An example game mechanic of what I would like to do is from the Playstation game Armada as shown here.

    Example Game Mechanic for the game Armada

    Many thanks.

    #2
    Originally posted by Farshad12 View Post
    First open your pawn blueprint, which you can find labeled as Pawn under Blueprints toolbar button of the editor. Then go to the components tab at the right and select "CharacterMovement" component at the left. Now in the details panel find this section:

    http://i.imgur.com/SkydVaB.png

    And hover the mouse over each of the properties to see how you can use it.

    To give a simple example, let's say you want to "freeze" y axis so the game will happen in the X-Z plane, then in that shot, just change the Y component of PlaneConstraintNormal property to 1, and assuming your game happens at Y=0, which should be the case, it's ready.
    In your case You'd want to freeze Z axis, so set Z component of PlaneConstraintNormal property to 1, and set the Z component of PlaneConstraintOrigin to the Z in mind.

    P.S. Where is the game? I gave up after a while, they talk too much, lol.

    Comment


      #3
      Originally posted by Farshad12 View Post
      In your case You'd want to freeze Z axis, so set Z component of PlaneConstraintNormal property to 1, and set the Z component of PlaneConstraintOrigin to the Z in mind.

      P.S. Where is the game? I gave up after a while, they talk too much, lol.
      Game is at 3:00 mark in the link. I already set the URL to open the video at the gameplay portion but guess you were put to the beginning of the video. I'll try your tips this afternoon and see if I can get my head around that. Thank you.

      Comment

      Working...
      X