Difference between revisions of "Tilt"

From Castle Wiki
(Add Tilt behavior)
 
m (Add "accelerometer" for better search visibility)
 
Line 4: Line 4:


Used by itself, the tilt behavior causes actors to accelerate without any limits, which means that if someone holds their device at an angle, the actor will keep moving faster and faster, like a ball rolling down a hill. In order to make the movement easier to control, it's a good idea to combine tilt with [[Slow down|Slow Down]] or [[Speed limit|Speed Limit]].
Used by itself, the tilt behavior causes actors to accelerate without any limits, which means that if someone holds their device at an angle, the actor will keep moving faster and faster, like a ball rolling down a hill. In order to make the movement easier to control, it's a good idea to combine tilt with [[Slow down|Slow Down]] or [[Speed limit|Speed Limit]].
Sometimes this device sensor is referred to as '''accelerometer'''.


== Properties ==
== Properties ==

Latest revision as of 20:06, 27 January 2023

Tilt is an interactive behavior which causes the blueprint's actors to move in response to tilting the device.

You can add Tilt by opening the Inspector for a blueprint, navigating to the Movement tab, and pressing Add physics or controls. Make sure the blueprint already has Dynamic motion.

Used by itself, the tilt behavior causes actors to accelerate without any limits, which means that if someone holds their device at an angle, the actor will keep moving faster and faster, like a ball rolling down a hill. In order to make the movement easier to control, it's a good idea to combine tilt with Slow Down or Speed Limit.

Sometimes this device sensor is referred to as accelerometer.

Properties

  • Acceleration: How much acceleration to apply to the actor from the device tilt.
  • Axis: One of x and y, only x, or only y.

Using Tilt with Rules

  • Tilt can be enabled or disabled using the Enable/Disable behavior Response.
  • There are individual Expressions for Device Tilt X and Device Tilt Y that can be used to control other things instead of acceleration.