Pseudo code:
Code: |
Process scroll_mouse(graph)
Begin
ctype = c_scroll;
Loop
x = scroll[0].camera.x + mouse.x;
y = scroll[0].camera.y + mouse.y;
frame;
End
End
|
That should follow mouse in "scroll space". I warn again; it's pseudo code, so check the manual for exact variable names (and what they do). If
scroll.camera.x points to viewport (that is scroll's region, if that was a thing) center then you need to subtract viewport width/2 from x and
height/2 from y. |