License from €75
DE EN FR ES IT CZ

Scroll scene by dragging

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Hi guys!!

    1. I have a big map as background image in a scene. Is it possible to scroll scene at any direction by dragging the map (using mouse or by hand on android version)?

    2. Is it possible to start a scene at a specific given position (for example in the middle of a big map) whithout the scroll effect at the beggining?
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    1. There's a checkbox option in each scene' properties tab: scroll scene if the cursor is at screen edge. If you tick that then the screen will scroll whenever the mouse enters the scroll borders at the edge of the current viewport.

    2. Sure, but you have to disable character centering. You will have to re-enable character centering when you want to make the camera automatically follow the character again.

    a. scene > center scene on character permanently > select character (tick clear centering checkbox)

    b. now you can define a scroll position without it scrolling by creating an execute a script action part containing...
    game.ScrollPosition = {x = 0, y = 0} -- replace 0, 0 with coordinates you want to set scroll position to.
    


    To re-enable camera follow character, you just have to follow step A, but leave the clear centering checkbox unchecked.
  4. · 12 years ago
    1. Yes, I know, but I was wondering if there is a way while pressing the mouse button to drag the whole scene at mouse direction...

    2. Thanks! I'll try it!
  5. · 12 years ago
    Hmm I suppose it would be possible. I suppose you could store initial value of mouse cursor & scene scroll position into variables, then create a loop & have it offset position by distance mouse has moved towards or away from mouse depending on whether you want to inverse axis etc.

    Will have to think about it. My head's a bit bleh, at the minute.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?