Description
The Tilt Controlled behavior will allow you to control and move any physics object by tilting the device. This behavior contains predefined properties to make the creation of certain games easier. It's perfect for platformers, and shooters. The Tilt Controlled behavior offers a lot of properties to customize the feel of your game. Try modifying the properties so your game doesn't feel like a generic platformer or shooter. For more advanced and in-depth games, it is recommended to create your own control scheme using the other behaviors.
This behavior will Trigger an event repeatedly while you're tilting the device in a certain direction.
Properties
Triggers Repeatedly on Event
Note: Some of these properties are not available, or behave differently when switching your project to Birds Eye View instead of Side View.
Object A |
This is the object you want to control by tilting. By default the current object is selected, but you can tap the graphic to change it to any other object in your scene. |
Tilt Positon |
This allows you to set a default resting position for your devices tilt. For example, 'Regular' is optimal for when you are sitting on a char, or 'Top Down' is good for when your device is flat on a table. |
Walking Speed |
This is how fast the object will move. The default value is 12 m/s. |
Air Speed |
This is how fast the object will move while it's in the air. Typically while falling from very high platforms. The default value is 12 m/s. |
Deceleration Rate |
This value determines how long it takes your character to come to a complete stop when you bring the device back to resting positon. The default value is 100% |
Controls Movement |
By default this toggle is on. If you turn off the toggle switch, your object will no longer move with tilting the device. This is often needed when you only want to tilt to control the rotation of the object. |
Invert X |
When this toggle switch is on, tilting the device left causes the object to go right, and tilting the device right causes the object to go to the left. By default this toggle is off. |
Invert Y |
When this toggle switch is on, tilting the device up causes the object to go down, and tilting the device down causes the object to go to the top. By default this toggle is off. |
Controls Rotation |
By default this toggle is off. If you turn on the toggle switch, your object will rotate with the tilt of the device. |
Lock Rotation |
This will prevent your object from rotating. This includes any rotation caused by other objects or physics in your scene. For example, you can turn this on to prevent your character from tipping over. If you enable Controls Rotation, this toggle is not available. By default this toggle is on. |
Analog Joystick |
When this toggle is on, your object is not limited to the standard 8 way movements by tilting. You can now control your object by tilting the device in more precise movements. This is often needed for games where you want to move a ball through a maze. |
Tilt Up |
When this is on, your object can move up. Keep in mind your object will still adhere to the rules of physics. So if there is gravity in your scene your object will not move up. This toggle will also prevent (or enable) an event triggering when the device is tilted in the up direction. |
Tilt Down |
When this is on, your object can move down. Keep in mind your object will still adhere to the rules of physics. So if there is an object in your scene preventing you from moving, you can not move down. This toggle will also prevent (or enable) an event triggering when the device is tilted in the down direction. |
Tilt Left |
When this is on, your object can move in the left direction. Keep in mind your object will still adhere to the rules of physics. So if there is an object in your scene preventing you from moving, you can not move left. This toggle will also prevent (or enable) an event triggering when the device is tilted in the left direction. |
Tilt Right |
When this is on, your object can move towards the right. Keep in mind your object will still adhere to the rules of physics. So if there is an object in your scene preventing you from moving, you can not move in the right direction. This toggle will also prevent (or enable) an event triggering when the device is tilted in the right direction. |
Play Animations |
When this toggle is on, your object will play an animation when the device is tilted to the specified direction. You must select an animation from the Custom Animations panel. |
Custom Animations |
On the left panel, you can select animation cycles to play when you tilt the device in the specified direction |
Animation Priority |
On the left Custom Animations panel, you can prioritize your movement animations so it does not conflict with another playing animation. The animation system will play a cycle with a higher priority. So if another animation behavior is interrupting your movement animation, try increasing the priority. |
Outputs
Object ID |
Outputs the object's ID. |
Examples
If you want to make a game where you control a ball and navigate a maze, you can simply add this behavior to your ball object, and now it will be a controllable by tilting the device to maneuver the ball through the maze.
Related
0 Comments