system
1
|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
Ternarycat |
Hi.
I want to make camera zooming on mobile devices. How can i do this?
how to realize zooming with multitouch?
Ternarycat | 2019-07-14 14:33
system
2
|
|
|
 |
Reply From: |
Dlean Jeans |
For Camera2D, change the zoom
property.
For 3D Camera, change fov
for Perspective
projection or size
for Orthogonal
projection.
okey, i know it. how connect this whith multitouch?
Ternarycat | 2019-07-14 14:32
There’s InputEventMagnifyGesture with a factor
property. I guess you can use it like this:
func _input(event):
if event is InputEventMagnifyGesture:
camera.zoom *= event.factor
Haven’t tested it yet but this should get you started.
Dlean Jeans | 2019-07-14 15:04