Welcome,
Guest
. Please
login
or
register
.
May 10, 2026, 08:16:32 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ? (Read 10139 times)
yuewah
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 180
Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?
«
on:
April 29, 2012, 09:38:20 AM »
Could you make a simple scene on how to do drag camera for RTS game using NGUI ?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?
«
Reply #1 on:
April 29, 2012, 09:51:12 AM »
Place a UICamera script on your Main Camera and choose "Nothing" for its Event Mask. After that set UICamera.fallThrough to a game object that has your camera-dragging logic on it, and add OnDrag() to it, doing what you want inside.
Logged
yuewah
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 180
Re: Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?
«
Reply #2 on:
April 29, 2012, 09:02:43 PM »
it works as expected. How about rotating camera and zooming using multi-touch , is it possible or not ? anyway, I will give it a try.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?
«
Reply #3 on:
April 30, 2012, 03:05:09 AM »
You can detect different touches by checking UICamera.lastTouchID.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Is NGUI support Drag Camera for RTS ( Real Time Strategy ) Game ?