0

I want to create a mobile Game, with only horizontal Camera Movement.
Like a SideScroller without the Camera being attached to an Actor.
I want to let the User only move within the given Range.
I'm using only Blueprints.
Just to make it sure, I really don't want to know, anything about the implemented Camera of any Mobile Device.
I just want my Camera Actor (From Unreal Engine) to behave like a normal App, where you can Scroll horizontal just by "swiping" the finger over the Screen from left-to-right to archieve a movement to the left and swiping from right-to-left to archieve a movement to the right.

Information I need:

  1. How can I move the Camera horizontal by mobile Touch? (similar to Scrolling a ListView/RecyclerView in Android)
  2. How can I just let the Camera move horizontal within the Map or given Range? (See Pic's with Grey Background)

Current Map: Current Map

Current Static Camera View (Shouldn't go any furhter to the left): Current Static Camera View (Shouldn't go any furhter to the left)

Example Camera View (Shouldn't go any furhter to the right): Example Camera View (Shouldn't go any furhter to the right)

Thanks in advance for any helpful advise.

Michael
  • 59
  • 1
  • 8

1 Answers1

-1

For the scrolling boundaries you could work with a float variable and set its min/max value manually. That way it never extends over those min/max values.

Or you could use this node instead.

Also check out this video, might give you an idea on how to implement your swipe mechanic.

  • Thanks for the answer, but as you mentioned. It only answers the 2 Question (Still thanks for that). – Michael Mar 27 '18 at 12:12
  • Found [this](https://www.youtube.com/watch?v=EWJYP9RUwb8). May help with that swipe mechanic. – spacebarisdefect Mar 27 '18 at 13:16
  • This is Quite good, but it isn't the same. It "jumps" back each time, I release the "Swipe" Mode. It is very Close to a Mobile behavior. Is there a more Common way, to do this? I really can't imagine, that I'm the only one, who need the smooth "Mobile Swipe". You can make your Comment to an Anwser, cause it answers the Question how to do it. I "just" need to adjust it for my purpose. – Michael Mar 27 '18 at 14:06