17 lines
516 B
Plaintext
17 lines
516 B
Plaintext
transform parallax(depth):
|
|
perspective True
|
|
subpixel True
|
|
zzoom True
|
|
zpos depth/100.0
|
|
function parallax_move
|
|
|
|
init python:
|
|
def parallax_move(trans, st, at):
|
|
x, y = renpy.get_mouse_pos()
|
|
xo = (x - config.screen_width // 2)
|
|
yo = (y - config.screen_height // 2)
|
|
trans.xoffset = xo * trans.zpos
|
|
trans.yoffset = yo * trans.zpos
|
|
trans.matrixtransform = Matrix.rotate(yo * 0.0004, xo * 0.000225, 0) * Matrix.scale(1.015, 1.015, 1.0)
|
|
return 0
|