You are on page 1of 12

!"#$%"%&'(&) +,$'(#$% -.

,/0 1%2',3%2 42(&) 4&('56 78 9('0


-.,/0:/3(#'
!" $"%% &'()*+(%
This aiticle pioviues an oveiview anu example foi the seveial TouchSciipt gestuies (Piess,
Release, Long Piess, Tap, Flick, Pan, Rotate, anu Scale) available when ueveloping touch-baseu
0nity* SB simulations anu applications iunning on 0ltiabook" uevices with the Winuows* 8
opeiating system. TouchSciipt is available at no cost fiom the 0nity SB Asset Stoie.
The example useu in this aiticle staits with a pieconfiguieu scene impoiteu fiom Autouesk Sus
Nax*. I then auu geometiy to the 0nity SB scene to constiuct giaphical usei inteiface (u0I)
wiugets that accept touch input fiom the usei. The multiple gestuies available via TouchSciipt will
be implementeu anu customizeu such that aujustments to the wiuget can be maue uuiing iuntime,
allowing foi a u0I wiuget that can pioviue a touch 0I that is acceptable to a wiuei auuience when
iunning a 0nity SB-baseu application on Winuow 8.
;3%<'(&) '0% =><"#$%
I fiist impoit into 0nity SB an Autouesk Sus Nax FBX* expoit that contains a few geometiy
piimitives anu a small patch of banyan anu palm tiees (see Figuie 1). I auu a fiist-peison
contiollei to the scene; then, I assign a box colliuei to the box piimitive impoiteu fiom
Autouesk Sus Nax, which acts as the scene's flooi, to pievent the fiist-peison contiollei fiom
falling out of the scene.
? !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,

,-./01 23 !"#$%& () *+#$,- .#$/ 0 12*"* #34,-$*+ 5-,3 67$,+*18 (+1 90:&
Next, I auu eight spheies (!"#$!%$$&"'()*+, !"#$,%-.'()*+, !"#$/%00&"'()*+, !"#$1-0"2'()*+,
,%.+$!%$$&"'()*+, ,%.+$,%-.'()*+, ,%.+$/%00&"'()*+, anu ,%.+$1-0"2'()*+) as chiluien of the
main cameia, which is a chilu of the fiist-peison contiollei. I give these spheies a tiansfoim scale
of : = u.1S % = u.Su ; = u.1S anu position them in fiont of the main cameia in a mannei similai to
fingeitips on a flat suiface. I auu a point light above the mouifieu spheies anu make a chilu of the
main cameia to ensuie illumination of the spheies. The layout of these mouifieu spheies is shown
in Figuie 2.
!"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2 7

! #$%$&'$( )*+,

,-./01 43 !"#$%& () -7"$#3* .#$/ 0 5#-1$<4*-1," 2,"$-,==*- 0"+ 3,+#5#*+ 14/*-*1 01 2/#=+-*" 5,- $/*
$,72/ #"$*-502*
This enus the base configuiation of the example. Fiom heie, I auu TouchSciipt gestuies to the
mouifieu spheies anu configuie sciipts to geneiate a uesiieu touch iesponse.
!""#$% '()** +$" ,)-)+*) .)*/0()*
The fiist-peison contiollei fiom the initialization step of the example contains the }avaSciipt* file
3451-6)$ 8(-$9(&&"9:;< anu the C# sciipt /()<" !((=:*<. The 3451-6)$ 8(-$9(&&"9:;< sciipt
takes input fiom the keyboaiu; /()<" !((=:*<> obviously, takes input fiom the mouse. I mouifieu
these sciipts to contain public vaiiables that ieplace veitical anu hoiizontal inputs into 3451-6)$
8(-$9(&&"9:;< anu to ieplace ?()<"@ anu ?()<"A inputs into the /()<" !((=:*< sciipt.
This ieplacement is faiily stiaightfoiwaiu in 3451-6)$8(-$9(&&"9:;< because the keyboaiu
senuing a 1, -1, oi u to the sciipt is ieplaceu with a touch event that iesults in public vaiiables
being changeu to a 1, -1, oi u. The touch objects, theii iespective sciipts, anu the values they senu
to sciipt 3451-6)$8(-$9(&&"9 aie pioviueu in Table 1 anu can be vieweu in theii entiiety in the
0nity SB 3%9<$4"9<(- pioject accompanying this aiticle.
&5671 23 &(/8' 96:18;+ 5%< =(001+*(%<-%. >80-*;+ -% ,?>@%*/;=(%;0(77103:+
@AB%/' .3 C22%' :/3(#' D,A$(/ E<3(<A$% +<&(#,$<'(.&
LeftLittleTouch MoveLeft.cs horizontal = -1 onPress, 0 onRelease
F !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,
@AB%/' .3 C22%' :/3(#' D,A$(/ E<3(<A$% +<&(#,$<'(.&
LeftRingTouch MoveForward.cs vertical = 1 onPress, 0 onRelease
LeftMiddleTouch MoveRight.cs horizontal = 1 onPress, 0 onRelease
LeftIndexTouch MoveReverse.cs vertical = -1 onPress, 0 onRelease
This methou woiks foi contiollei position because the infoimation is uisciete, as aie the
TouchSciipt (-49"<< anu (-,"&"B<" functions. Foi iotation, an angle vaiiable neeus to be upuateu
eveiy fiame. To accomplish this, I senu a Boolean value to a /()<" !((=:*< public vaiiable, anu
the iotation angle is changeu in the /()<" !((=:*< C60B$" function at a iate of 1 uegiee pei
fiame accoiuingly. The touch objects, theii iespective sciipts, anu the values they senu to the
/()<" !((=:*< sciipt aie pioviueu in Table 2 anu can be vieweu in theii entiiety in the 0nity SB
3%9<$4"9<(- pioject accompanying this aiticle.
&5671 43 &(/8' 96:18;+ 5%< =(001+*(%<-%. >80-*;+ -% A(/+1 $((B3 8+
@AB%/' .3 C22%' :/3(#' D,A$(/ E<3(<A$% +<&(#,$<'(.&
RightLittleTouch LookDown.cs lookDown = true onPress, false onRelease
RightRingTouch LookRight.cs lookRight = true onPress, false onRelease
RightMiddleTouch LookUp.cs lookUp = true onPress, false onRelease
RightIndexTouch LookLeft.cs lookLeft = true onPress, false onRelease
These sciipts allow touch inteiface foi fiist-peison shootei (FPS) position anu iotation contiol,
ieplacing keyboaiu anu mouse input.
1*#$% /2) 34$%'()** .)*/0()
Ny oiiginal intent foi this example was to have the LongPiess uestuie make all the touch objects
uisappeai aftei at least one object hau been piesseu foi a ceitain amount of time. The touch
objects woulu then all ieappeai aftei all touch objects hau instigateu a ielease gestuie anu hau not
been toucheu foi a ceitain amount of time. When I tiieu implementing it this way, howevei, the
behavioi was not as I expecteu, possibly because the LongPiess uestuie was useu in conjunction
with the stanuaiu Piess anu Release uestuies. As a woikaiounu, I implementeu this functionality
by using the alieauy-implementeu Piess anu Release uestuies in combination with public
vaiiables anu the uelta time methou in the system timei.
When initially setting up the 0nity SB scene, I configuieu a '(6!"D"&EB?"FG;"*$ asset to holu the
TouchSciipt Touch Nanagei anu the TouchSciipt Winuows 7 Touch Input sciipt. To facilitate the
uesiieu LongPiess uestuie, I auueu a custom C# sciipt nameu 4)G&%*HB9%BG&"<:*< to the
'(6!"D"&EB?"FG;"*$ asset. I uiu this not only to holu public vaiiables but also to peifoim actions
baseu on the state of these vaiiables.
To configuie this uisappeai anu ieappeai functionality, I configuieu each move anu look sciipt
associateu with its iespective touch spheie to have access to the public vaiiables in
!"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2 G

! #$%$&'$( )*+,
4)G&%*HB9%BG&"<:*<. 4)G&%*HB9%BG&"<:*< contains a Boolean vaiiable foi the state of each
mouifieu spheie's move oi look Piess uestuie, being tiue when the mouifieu spheie is piesseu
anu false when it is ieleaseu.
The 4)G&%*HB9%BG&"<:*< sciipt uses the state of these vaiiables to configuie a single vaiiable
useu to set the state of each mouifieu spheie's /"<+,"-0"9"9. I configuie the timei such that if any
mouifieu spheie oi combination of mouifieu spheies has been piesseu foi moie than 1u seconus,
the vaiiable contiolling the /"<+,"-0"9"9 state is set to False. If all of the spheies have been
ieleaseu foi moie than 2 seconus, the /"<+,"-0"9"9 state is set to Tiue. Each move anu look sciipt
has in its C60B$" function a line of coue to enable oi uisable its iespective spheie's /"<+,"-0"9"9
baseu on the state of this vaiiable in 4)G&%*HB9%BG&"<:*<.
This coue iesults in all of the mouifieu spheies uisappeaiing when any spheie oi combination of
spheies has been piesseu foi moie than 1u consecutive seconus. The mouifieu spheies then all
ieappeai if all mouifieu spheies have been ieleaseu foi moie than 2 seconus. By enabling anu
uisabling the mouifieu spheies' /"<+,"-0"9"9, only the mouifieu spheie's visibility is affecteu, anu
it iemains an asset in the scene anu is able to piocess touch gestuies. As such, the mouifieu
spheies aie still useu to manipulate the scene's fiist-peison contiollei. The usei is iequiieu to
intuitively know wheie the spheies aie positioneu anu be able to use them while they aie not
being ienueieu to the scieen. Examine the 4)G&%*HB9%BG&"<, /(D", anu !((= sciipts in the
example pioviueu to see the coue in its entiiety.
52) 5+6 .)*/0()
To uemonstiate the use of multiple gestuies with one asset, I auu the Tap uestuie to all foui move
spheies. The Tap uestuie is configuieu in all foui of the left u0I wiuget's mouifieu spheies'
iespective move sciipts. The move sciipts aie then configuieu foi access to the fiist-peison
contiollei's 8+B9B*$"9 /($(9 sciipt. I configuie the tap functions in each move sciipt to
manipulate the maximum speeu vaiiables in the 8+B9B*$"9 /($(9's movement function.
The /(D"3(9IB90 sciipt attacheu to the !"#$,%-.'()*+ mouifieu spheie is configuieu so that a
Tap uestuie incieases the maximum foiwaiu speeu anu maximum ieveise speeu by one. I
configuie the /(D","D"9<" sciipt attacheu to the !"#$1-0"2'()*+ mouifieu spheie foi a Tap
uestuie to ueciease the maximum foiwaiu speeu anu maximum ieveise speeu by one. I configuie
the /(D"!"#$ sciipt attacheu to the !"#$!%$$&"'()*+ mouifieu spheie foi a Tap uestuie to
inciease the maximum siueways speeu by one anu the /(D",%.+$ sciipt attacheu to the
!"#$/%00&"'()*+ mouifieu spheie foi a Tap gestuie to ueciease the maximum siueways speeu by
one. The maximum speeu vaiiables aie floating-point values anu can be aujusteu as uesiieu.
When using the uefault settings with the Tap uestuie, the speeus change uuiing the peiiou when
the usei may want to piess the mouifieu spheie to instigate movement. In shoit, Piess anu Release
uestuies aie also consiueieu Tap uestuies. To mitigate this behavioi, I changeu the &-)1 $-)-;
setting in the C-77 D18(.%-E1 section of the Tap uestuie (see Figuie S) fiom @%F-%-;" to G34H. The
lowei this setting, the shaipei the tap action must be to instigate the Tap uestuie.
H !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,

,-./01 I3 !"#$%& () *+#$,- 1/,.#"> 0 3,+#5#*+ ?#3* @#3#$ 1*$$#"> #" 0 ?04 A*1$7-*
The mouifieu spheie can be useu to navigate the scene anu aujust the speeu at which the scene is
navigateu. A quiik of this methou foi navigating anu aujusting speeu is that when a Tap uestuie is
useu to aujust speeu, the fiist-peison contiollei is also moveu in the uiiection associateu with the
mouifieu spheie that was tappeu. Foi example, tapping the !"#$1-0"2'()*+ mouifieu spheie to
ueciement the maximum foiwaiu speeu anu maximum ieveise speeu slightly moves the fiist-
peison contiollei, anu subsequently the scene's main cameia, in ieveise. In the accompanying
0nity SB pioject, I auu u0I labels to uisplay the maximum speeu setting so that the labels can be
visualizeu when tapping the mouifieu spheies. You can iemove this quiik by auuing a u0I wiuget
component that, when useu, uisables the Piess anu Release uestuies, allowing the usei to tap the
u0I wiuget component without moving the main scene's cameia. Aftei the maximum foiwaiu
speeu anu maximum ieveise speeu aie set to the usei's piefeience, the new u0I wiuget
component can be useu again to enable the Piess anu Release uestuies.
When ueveloping this poition of the example, I intenueu to auu a Flick uestuie in combination
with the Tap uestuie. The Tap uestuie was going to inciease speeu, anu the Flick uestuie was
intenueu to ueciease speeu. Bowevei, when auuing both the Flick anu the Tap uestuies, only the
Tap uestuie was iecognizeu. Both woikeu inuepenuently with the Piess anu Release uestuies, but
the Flick uestuie was nevei iecognizeu when useu in conjunction with the Tap uestuie.
52) 7-#89 .)*/0()
To uemonstiate the Flick uestuie, I auu functionality to the mouifieu spheies on the iight siue of
the scieen. The look sciipts aie attacheu to these spheies anu contiol the iotation of the scene's
!"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2 I

! #$%$&'$( )*+,
main cameia, which is a chilu of the fiist-peison contiollei. I begin by auuing a Flick uestuie to
each spheie. I configuie the Flick uestuies auueu to the ,%.+$'()*+1-0"2 anu ,%.+$'()*+,%-.
mouifieu spheies that contiol hoiizontal iotation with theii touch uiiection as hoiizontal (see
Figuie 4). I configuie the Flick uestuies auueu to the ,%.+$'()*+/%00&" anu ,%.+$'()*+!%$$&"
mouifieu spheies that contiol veitical iotation with theii touch uiiection as veitical. This may be
useful when the mouifieu spheies have uisappeaieu aftei being piesseu foi 1u oi moie seconus
anu the touch inteiface uoes not iesponu to the usei's flick (as opposeu to iesponuing in an
unuesiieu mannei). The usei then knows that the touch inteiface-mouifieu spheies neeu to be
ieleaseu, allows 2 seconus foi the mouifieu spheies to ieappeai, anu then ieengages the touch u0I
wiuget.

,-./01 J3 !"#$%& () *+#$,- 1/,.#"> 0 3,+#5#*+ )#-*2$#," 1*$$#"> #" 0 B=#28 A*1$7-*
Each look sciipt uses the public vaiiables that exist in the /()<" !((= sciipt. When a mouifieu
spheie is flickeu, the /()<" !((= sciipt instigates a iotation in the iespective uiiection, but
because theie is no flick Release uestuie, the iotation continues inuefinitely. To stop the iotation,
the usei must shaiply piess anu ielease the mouifieu spheie that was flickeu. This action causes
an auuitional uegiee of iotation fiom the Piess uestuie but is followeu by the Release uestuie,
which sets the iespective iotation public vaiiable to False, stopping the iotation.
Like the Tap uestuie, the Flick uestuie now woiks in conjunction with the Piess anu Release
uestuies. 0seis can still iotate the scene's main cameia by holuing uown the appiopiiate mouifieu
spheie, ieleasing it to stop the iotation. With the Flick uestuie implementeu, useis can also flick
the uesiieu mouifieu spheie to instigate a continuous iotation that they can stop by piessing anu
ieleasing the same mouifieu spheie.
J !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,
52) ,):+#$#$% .)*/0()*
To this point in the example, all of the gestuies implementeu enhance the usei's ability to uiiectly
navigate the scene. I use the iemaining gestuies (Rotate, Scale, anu Pan) to allow the usei to
mouify the touch taigets' (the mouifieu spheies) layout foi impioveu eigonomics.
Also, up to this point, all of the gestuies aie uisciete in natuie. An immeuiate action occuis when a
0nity SB asset is tappeu, piesseu, ieleaseu, oi flickeu. This action may be the setting of a vaiiable
that iesults in a continuous action (the flick-instigateu iotation), but the actions aie uisciete in
natuie. The Rotate, Scale, anu Pan uestuies aie continuous in natuie. These gestuies implement a
uelta methou wheie the uiffeience between the cuiient state of the gestuie anu that of the
pievious fiame is useu in the sciipt to manipulate a 0nity SB scieen asset as uesiieu.
52) ,4/+/) .)*/0()
I auu the Rotate uestuie in the same way as pievious gestuies. I use the K<< =()*(%1%; menu in
the Inspectoi Panel to auu the TouchSciipt gestuie, anu the sciipt attacheu to the touch asset
ieceiving the gestuie is mouifieu to ieact to the gestuie. When implementeu, the Rotate uestuie is
instigateu by a movement similai to using two fingeis to iotate a coin on a flat suiface. This action
must occui within an aiea ciicumsciibeu by the 0nity SB asset ieceiving the gestuie.
In this example, iotating the mouifieu spheies iesults in the capsule shape becoming moie of a
spheie as the enu of the mouifieu spheie is biought into view. This behavioi gives the usei an
alteinate touch taiget inteiface, if uesiieu. In this example, this functionality is of moie use foi the
mouifieu spheies on the iight siue of the scieen. Foi the iotate wiuget on the iight siue of the
scieen, the usei can flick the appiopiiate mouifieu spheie foi constant iotation up, uown, left, oi
iight. I configuie the mouifieu spheies contiolling veitical iotation with veitical flicks. I configuie
the mouifieu spheies contiolling hoiizontal iotation with hoiizontal flicks. The mouifieu spheies
contiolling hoiizontal iotation can now be iotateu so that the longest uimension is hoiizontal,
allowing foi a moie intuitive flicking action.
When iotating the mouifieu spheies that aie closest to the centei of the scieen, the mouifieu
spheies take on a moie spheiical appeaiance. The faithei away fiom the centei scieen the
mouifieu spheie is when being iotateu, the mouifieu spheie takes on a moie capsule-like
appeaiance. This is an effect of the mouifieu spheie's uistance fiom the scene's main cameia. It
may be possible to mitigate this affect by aujusting the axes on which the mouifieu spheie iotates.
The following line of coue uoes the woik of iotating the mouifieu spheie when the Rotate uestuie
is active:

targetRot = Quaternion.AngleAxis(gesture.LocalDeltaRotation,
gesture.WorldTransformPlane.normal) * targetRot;
The seconu aigument in the J)B$"9-%(-:K-.&"K2%< is the axis on which the mouifieu spheie
iotates. This aigument is a H"*$(9L anu can be changeu as follows:
!"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2 K

! #$%$&'$( )*+,

targetRot = Quaternion.AngleAxis(gesture.LocalDeltaRotation, new Vector3(1, 0, 0)) *
targetRot;
By aujusting this H"*$(9L as a function of the mouifieu spheie's uistance fiom the position ielative
to the scene's main cameia, I can iemove the effect, iesulting in the mouifieu spheie's appeaiance
being moie consistent anu spheiical acioss all the spheies.
52) ;8+-) .)*/0()
I auu the Scale uestuie as an auuitional means of alteiing the mouifieu spheie's piesentation.
When iotateu, the iesulting ciiculai touch taiget may not be laige enough foi the usei's
piefeience. The usei can employ the Scale uestuie to mouify the size of the touch taiget.
The motion useu to instigate a Scale uestuie is similai to the Pinch uestuie useu on mobile
uevices. Two fingeis aie moveu apait anu biought togethei foi a scale-uown gestuie. The fingeis
aie togethei anu moveu apait to instigate a scale-up gestuie. The coue in the accompanying
0nity SB pioject scales the taiget asset unifoimly. This is not iequiieu: You can coue foi scaling on
any combination of the :C %C oi ; axes.
An auuitional featuie that may help with usei utilization of the u0I wiugets is automatic scaling
following the 1u seconus of constant use, iesulting in the uisappeaiance of the u0I wiugets. By
automatically multiplying a mouifieu spheie's $9B-<#(9?:&(*B&<*B&" by 1.1 whenevei the
mouifieu spheie's /"<+,"-0"9"9 has been uisableu, the usei automatically gets a laigei touch
taiget, which may ieuuce the usei's neeu to inteimittently ielease the u0I wiugets to confiim the
mouifieu spheie's location on the touch scieen.
52) '+$ .)*/0()
Foi the puiposes of eigonomics, the Pan uestuie is piobably the most useful gestuie. It allows
useis to touch the objects to be manipulateu anu uiag them anywheie on the scieen. As the
mouifieu spheies aie initially positioneu, useis may, uepenuing on the 0ltiabook uevice they aie
using, have wiists oi foieaims iesting on the keyboaiu. With the Pan uestuie functionality
implementeu, useis can uiag the mouifieu spheies to the siues of the scieen, wheie theie may be
less chance of inauveitently touching the keyboaiu. Foi auuitional eigonomic optimization, useis
can touch all foui mouifieu spheies that affect the fiist-peison contiollei anu uiag them at the
same time to a place on the scieen that allows them to iest theii wiists anu aims as uesiieu.
The following two lines of coue, taken fiom a 0nity SB example, uo the woik of moving the
0nity SB scene asset when the Pan uestuie is active:

var local = new Vector3(transform.InverseTransformDirection(target.WorldDeltaPosition).x,
transform.InverseTransformDirection(target.WorldDeltaPosition).y, 0);
targetPan += transform.parent.InverseTransformDirection(transform.TransformDirection(local));
LM !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,
Note that in the above coue, the M component of the H"*$(9L is zeio anu that in the accompanying
example, when the mouifieu spheies aie moveu, oi 40""*+C they move only in the x-y plane. By
mouifying this D*2$,-(, you can customize the inteiface a gieat ueal. The fiist example that comes
to minu is having a Pan uestuie iesult in a much fastei 0nity SB asset motion on one axis than
anothei.
In the "Eveiything" example pioviueu with TouchSciipt, the following line of coue limits the
panning of the manipulateu asset on the %-axis:

if(transform.InverseTransformDirection(transform.parent.TransformDirection(targetPan -
startPan)).y < 0) targetPan = startPan;
This line was commenteu out in the accompanying example but can easily be mouifieu anu
implementeu if you want to limit how fai a usei can move a u0I wiuget component fiom its
oiiginal position.
N%2.$O(&) !22,%2 8,3(&) 8%O%$.#"%&' .P '0% =><"#$%
0ne issue I founu uuiing uevelopment was that the Rotate uestuie nevei seemeu to be iecognizeu
when the Piess, Release, anu Tap uestuies weie auueu. To woik aiounu this issue, I auueu a
mouifieu spheie to the u0I wiuget on the left siue of the scieen intenueu foi use by the left thumb.
I configuieu this mouifieu spheie with a sciipt ('(..&","(9.B-%M":*<) so that when a usei taps
the mouifieu spheie, a Boolean vaiiable is toggleu in the 4)G&%*HB9%BG&"< sciipt. All of the
mouifieu spheie's sciipts iefeience this vaiiable anu uisable theii Piess, Release, Tap, oi Flick
uestuie when the $(..&" vaiiable is Tiue, iesulting in a 0I that iequiies the usei to tap the left
thumb button to mouify the wiuget. The usei must then tap this left thumb button again when
finisheu mouifying the wiuget to go back to navigating the scene.
Buiing the piocess of implementing this functionality, I uiscoveieu that the iight wiuget uiu not
iequiie this functionality foi the wiuget to be mouifieu. The usei coulu iotate, pan, anu scale the
wiuget without tapping the left thumb mouifieu spheie. I implementeu the functionality anyway,
foicing the usei to tap the left thumb mouifieu spheie in the left wiuget to altei the eigonomics of
the iight wiuget. I uiu this because the iight wiuget became awkwaiu to use when it was mouifieu
at the same time it was being useu to navigate the scene.
Q..R(&) C0%<S
In auuition to the 0nity SB scene navigation contiol, useis can customize the u0I wiugets. They
can iotate, scale, anu move (pan) the components of the wiuget to suit theii eigonomic neeus. This
functionality is valuable when ueveloping applications that suppoit multiple platfoims, such as
0ltiabook uevices, touch laptops, anu tablets. These platfoims can be useu in any numbei of
enviionments, with useis in a vaiiety of physical positions. The moie flexibility the usei has to
!"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2 LL

! #$%$&'$( )*+,
aujust u0I wiuget configuiation in these enviionments, the moie pleasant the usei's expeiience
will be.
The u0I wiugets useu in the accompanying example can anu shoulu be expanueu to use auuitional
u0I wiuget components uesigneu foi thumb use that can contiol assets in the game oi simulation
oi contiol assets that aie components of the u0I wiugets. This expansion may incluue items in the
simulation, such as weapons selection, weapons fiiing, cameia zoom, light coloi, anu jumping. To
altei the u0I wiuget components, these thumb buttons can change the mouifieu spheies to cubes
oi custom geometiy. They can also be useu to change the opacity of a mateiial oi coloi that u0I
wiuget components use.
;.&/$,2(.&
This aiticle anu the accompanying example show that using TouchSciipt with 0nity SB is a valiu
means of implementing a usei-configuiable u0I wiuget on 0ltiabook uevices iunning Winuows 8.
The u0I wiugets implementeu in the example pioviue a touch inteiface foi the 0nity SB fiist-
peison contiollei. This inteiface can similaily be connecteu to the 0nity SB thiiu-peison
contiollei oi custom contiolleis simulating an oveiheau, uiiving, oi flying enviionment.
When ueveloping 0nity SB u0I wiugets foi 0ltiabook uevices iunning Winuows 8, the uesiieu
iesult is foi useis to not ieveit back to the keyboaiu anu mouse. All of the functionality that is
typically associateu with a legacy 0I (a keyboaiu anu mouse fiist-peison contiollei) shoulu be
implementeu in a piouuction-giaue touch inteiface. By taking this into consiueiation when
implementing the TouchSciipt gestuies uesciibeu in this aiticle anu the accompanying example,
you can gieatly inciease youi piospects foi obtaining a positive usei iesponse.
L(;1M The example pioviueu with this aiticle uses anu iefeiences the examples pioviueu with TouchSciipt as
uownloaueu at no cost fiom the 0nity SB Asset Stoie.
CA.,' '0% C,'0.3
Lynn Thompson is an IT piofessional with moie than 2u yeais of expeiience in business anu
inuustiial computing enviionments. Bis eailiest expeiience is using CAB to mouify anu cieate
contiol system uiawings uuiing a contiol system upgiaue at a powei utility. Buiing this time,
Lynn ieceiveu his B.S. uegiee in Electiical Engineeiing fiom the 0niveisity of Nebiaska, Lincoln.
Be went on to woik as a systems auministiatoi at an IT integiatoi uuiing the uot com boom. This
woik focuseu piimaiily on opeiating system, uatabase, anu application auministiation on a wiue
vaiiety of platfoims. Aftei the uot com bust, he woikeu on a iange of piojects as an IT consultant
foi companies in the gaiment, oil anu gas, anu uefense inuustiies. Now, Lynn has come full ciicle
anu woiks as an engineei at a powei utility. Be has since eaineu a Nasteis of Engineeiing uegiee
with a concentiation in Engineeiing Nanagement, also fiom the 0niveisity of Nebiaska, Lincoln.

L? !"#$%"%&'(&) +,$'(#$% -.,/0 1%2',3%2

! #$%$&'$( )*+,
Notices
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE,
EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS
GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR
SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR
IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR
WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR
INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.

UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR
INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A
SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.

Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the
absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future
definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
The information here is subject to change without notice. Do not finalize a design with this information.

The products described in this document may contain design defects or errors known as errata which may cause the product
to deviate from published specifications. Current characterized errata are available on request.

Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product
order.

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be
obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm
Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors.
Performance tests, such as SYSmark* and MobileMark*, are measured using specific computer systems, components,
software, operations, and functions. Any change to any of those factors may cause the results to vary. You should consult
other information and performance tests to assist you in fully evaluating your contemplated purchases, including the
performance of that product when combined with other products.
Any software source code reprinted in this document is furnished under a software license and may only be used or copied in
accordance with the terms of that license.
Intel, the Intel logo, and Ultrabook are trademarks of Intel Corporation in the U.S. and/or other countries.
Copyright 2013 Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.

You might also like