Logic Gadgets: Movement Sensor

 

Icon
Name of gadget Movement sensor
Section Sensors & Input
Number of Tweak pages 2
Author LadylexUK, QuietlyWrong
Last updated 18 Feb 2019 [Beta]

Description

This gadget allows you to detect the velocity, acceleration and scene position of an object. This allows you to tell if an object is moving, how fast it is moving and where it is. You can use this to trigger events depending on this information, such as inflicting fall damage, or letting out a scream.

Example Tutorial (from Media Molecule)

  1. Stamp a cube.
  2. Snap a movement sensor to it.
  3. Snap a mover to it.
  4. Tweak the cube outer properties menu, use the tint colour picker to pick a red .
  5. Bump the tint amount to 200%
  6. Stamp a calculator gadget
  7. Tweak it to show greater than
  8. Set operand B to 2.00
  9. Tweak the movement sensor, connect velocity (overall) to the input port of operand A in the calculator gadget.
  10. When the velocity of the cube is greater than 2 it will output a positive signal. Connect the result output on the calculator to the tint colour of the cube. This will turn the cube red.
  11. Use test mode to see the result.

Tweak Menus

Tweak Menu 1: Important Properties
  1. Tweak Menu page 1: Important Properties
  2. Sense Movement
    2a Input
  3. Velocity (Overall)
    3b. Output
  4. Velocity (X Axis)
    4b Output
  5. Velocity (Y Axis)
    5b. Output
  6. Velocity (Z Axis)
    6b Output
  7. Local Space
    7a. Input
    7b. Output
  8. Relative to Object
  9. X Direction
    9b Output
  10. Y Direction
    10b Output
  11. Z Direction
    11b Output
  12. Power

Note that the various velocity outputs can have positive or negative values, depending on the direction of movement

  1. Menu page indicator
  2. Sense Movement
    Connect a wire from this input to the object that you want to test for movement. Alternatively, if you snap the gadget to an object, or to a microchip snapped on the object, that object defaults to being the one tested
  3. Velocity (Overall)
    This will provide a signal with the object’s speed amount in any direction
  4. Velocity (X Axis)
    This will provide a signal with the object’s speed amount parallel to the x axis
  5. Velocity (Y Axis)
    This will provide a signal with the object’s speed amount parallel to the y axis
  6. Velocity (Z Axis)
    This will provide a signal with the object’s speed amount parallel to the z axis
  7. Local Space
    Toggle this on or off to determine whether the gadget’s outputs are relative to the orientation of the object itself or to the global axes. If necessary, you can always rotate an object’s local axes, for example so that “forward” is always along the y-axis from the point of view of your object, regardless of how it turns.
  8. Relative To Object
    TBA [I believe you can specify another object such that the velocity output of this gadget is relative to the other object’s current velocity – QW]
  9. X Direction
    This sends a signal corresponding to the current angle of movement with respect to the x axis
  10. Y Direction
    This sends a signal corresponding to the current angle of movement with respect to the y axis
  11. Z Direction
    This sends a signal corresponding to the current angle of movement with respect to the z axis
  12. Power
    This is where you turn the gadget on/off
Tweak Menu 2: Acceleration Outputs
  1. Tweak Menu 2: Acceleration Outputs
  2. Acceleration (Overall)
    2b. Output
  3. Acceleration (X Axis)
    3b Output
  4. Acceleration (Y Axis)
    4b Output
  5. Acceleration (Z Axis)
    5b Output
  6. Power

Note that the various acceleration outputs can have positive or negative values, depending on the direction of movement

  1. Menu page indicator
  2. Acceleration (Overall)
    This will provide a signal with the object’s acceleration amount in any direction
  3. Acceleration (X Axis)
    This will provide a signal with the object’s acceleration amount in the x axis only
  4. Acceleration (Y Axis)
    This will provide a signal with the object’s acceleration amount in the y axis only
  5. Acceleration (Z Axis)
    This will provide a signal with the object’s acceleration amount in the z axis only
  6. Power
    This is where you turn the gadget on/off

Lex Tips

Useful Tutorials

Advertisements

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: