Touch Behavior Properties
Touch Behavior properties determine how assets or components react when affected by touch actions of users on a multi-touch system.
Note: Only components that have a visible appearance on the interface have Touch Behavior properties. Invisible components do not process touch commands.
Adjusting Touch Behavior
Select the corresponding component in the Scene Manager and go to the Touch Behavior section located under the Properties tab in the Inspector. Please check the corresponding checkbox or type a value into the corresponding field. To change numeric values, you can also right-click the numeric field and change its value by moving your mouse while keeping the right mouse button pressed.
Touch Behavior Properties
- Inactive: Checking this option disables all touch behavior for the component, rendering a static element in the multi-touch scenario.
- Draggable: Selecting this options will allow you to drag the object across the interface. To move an object, place multiple fingers on it and move them in the same direction.
- Rotatable: Selecting this option will allow you to rotate an object. To do that, place two fingers on it and move them in a circular fashion.
- Scalable: Selecting this option will allow you to scale an object, i.e. render it larger or smaller. To do so, place two fingers on the object and make a pinching motion to make the object smaller, or move them away from each other to enlarge it.
- Consume: This sets the component to consume all touches meaning no other component will be affected by the same touch. If not selected, components behind it will also receive the touches. Note that invisible components do not receive touch events, but visible components that are covered by other components might do, if the covering components do not consume the touch.
- Capture: With this activated, a touch must begin within an object to grab it, otherwise the object won't be affected. The focus stays with the object as long as the touch is maintained, even if the touch leaves the object. If this option is deactivated, a touch started outside an object will affect the object when moving over it. A fast moving touch that leaves the object will "lose" the object.
- Bring to Front: Selecting this option will bring an object to the front when the touch starts within the object. With multiple objects placed over each other, the rearmost object will be brought to the front.
- Scale Range: Enter a minimum and maximum size to which the object can be scaled. These should be percentages (i.e. 10% - 800%).
- Translation Bounds: Enter the outer edges within which the component can be moved. Having these settings left blank will allow the object to be moved anywhere, even off of the edge.
Working with Touch Behavior Properties
Touch Behavior properties affect any components with visible appearance in a multi-touch scenario. They determine how a user's touch events will be interpreted. There are several important points to be kept in mind when adjusting touch behavior.
Draggable, Rotatable and Scalable are basic multi-touch attributes. You must set a component to be draggable in order to enable the other properties. However, Rotatable and Scalable can be adjusted independently of each other.
Consume is important in relation to other components in the scene. As a rule, you will find it preferable to have Consume selected as this prevents users from grabbing multiple components with a single touch event. However, deselecting the Consume option can be useful for games and a scenario with a cloud of image components.
You probably need to set Scale Range for most components you want to be scalable. Not doing so may lead to components being scaled over most of the multi-touch surface, thus obscuring other components and messing up the whole scenario. The percentage you enter for the scale is based on the original size of the component as set in the Layout properties.
Inactive is useful to freeze components in the overall multi-touch scene. For instance, you may want to add a background to your scene, such as your brand logo or a picture of some of your products. This background should obviously not be affected by touch events in any way. Select the Inactive option and all touch behavior for the component will be disabled.
Bring to Front helps users have a nice multi-touch experience. It saves them from having to tediously reorganize a bunch of components in order to see the one underneath. On the other hand, a component that has Bring to Front selected may block other content. This is something to consider when creating a scenario designed for multi-user interaction. It definitely needs some testing in the Stage.
It is often convenient to set Translation Bounds for a component as this keeps it from being moved off of the interface and being "lost" until the scene is restarted. To do this, simply set the translation bounds to the edges of the screen in relation to the edges of the component. Note that the coordinate origin (0,0) is at the bottom left corner of the display.
Alternatively, you may want to limit a component to a part of the interface. You can do that by specifying that area of the interface in the Translation Bounds properties. It is important to note that the starting position as determined in the Layout properties should correspond to the translation bounds, which will override the position properties otherwise.
Note: Scale Range and Translation Bounds will reset to default values when deactivated.