Announcement

Collapse
No announcement yet.

Side Scroller Template doubt

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

    Side Scroller Template doubt

    Hello ,

    I was studing the 3d side scroller template to learn how it's done ,but there is something I can not understand , and it is how the player turns to the other side when you pres the ''A '' key or he left arrow.

    I can see that in the axis mappings there is the ''A'' key and the ''D'' key ,

    Click image for larger version

Name:	AxisMapping.JPG
Views:	65
Size:	18.6 KB
ID:	1687183


    but I dont see how they implement this in to the side scroller character Blueprint.

    Click image for larger version

Name:	Movement.JPG
Views:	41
Size:	33.2 KB
ID:	1687184


    I mean I see in the blueprint that the moveRight Axis Mapping is controling the movement , but I dont get how the character turns tot he other side , if it does not have any information of orientation here.



    I mean passing from this position :

    Click image for larger version

Name:	Right.JPG
Views:	39
Size:	15.9 KB
ID:	1687185


    to this :

    Click image for larger version

Name:	Left.JPG
Views:	41
Size:	14.9 KB
ID:	1687186



    Hope you can help me to understand this

    thank you so much for your help guys !

    #2
    You can see in the Axis mapping that the scale for pressing "D" is "1". But for "A" it is "-1". Which means that the value coming out of the green Axis Value output is either 1 or -1. And -1 will invert the direction. It is called "Move Right", but is also used for movement to the left since the value gets inverted by the input mapping.

    If you hook up a "Print String" node after the "InputAxis Move Right" node plug in the green "Axis Value" output into the input of the Print String node you will see which value comes out of it when pressing either A or D (or Left and Right arrow keys). If you use a gamepad you will notice that you also get values inbetween 0 and 1 or 0 and -1 depending how much you push the thumbstick in either direction.

    Comment


      #3
      Hello , thanks for the reply really appreciate ! , yes I understand that part the only thing I don't get is this :

      if you select the chracter that comes with the side scroller template and remove the animation blueprint from here :



      so right now there is no animations , but if you play the game the character still can move to the left and turn to the right but with out the animations.
      Thats the part I dont get, where is this info comming from , if the only thing that is set in the blueprint is this :

      Click image for larger version  Name:	Movement.JPG Views:	0 Size:	33.2 KB ID:	1687210
      I understand that with this he can move to the right and left but I dont get where is the turning transition comming from , when you are running to the left and then you turn to the right.
      Last edited by mtazzioli; 11-14-2019, 05:31 PM.

      Comment

      Working...
      X