Logic Gadgets: Look At Rotator

Icon
Name of gadget Look at Rotator
Section Movers & Outputs
Number of Tweak pages 3
Author LadylexUK, QuietlyWrong
Last updated 28 Feb 2019 [Beta]

Description

This gadget allows you to rotate an object to face another, such as a pair of eyes following the player as they walk past a painting in a haunted house or a laser tower constantly tracking the nearest enemy in a tower defence game.  The preferred orientation of the object to be rotated is decided with a gizmo and the speed and strength of its rotation can be tweaked to accommodate everything from a lazily swinging compass needle to an instantaneous HUD pointer.

Example Tutorial (adapted from Media Molecule)

  1. Stamp a pyramid.
  2. Snap a Look at Rotator to the pyramid.
  3. Tweak the Look at Rotator and make the arrow point in the same direction as the pointy end of the pyramid (if you’re having difficulty snap the grid on).
  4. Stamp a puppet.
  5. Snap a tag gadget to the puppet.
  6. Name the tag “Player”.
  7. In the Look at Rotator type “Player” into the look for tag field.
  8. Go to test mode.
  9. Possess the puppet and walk around.  The pyramid should rotate to follow the puppet.

Tweak Menus

Click on arrows to reveal

Tweak Menu 1: Properties
  1. Tweak Menu page 1:  Properties
  2. Rotation Speed
    2a. Input
    2b. Ouput
  3. Stay Upright
    3a. Input
    3b. Output
  4. Rotation Strength
    4a. Input
    4b. Output
  5. Overall Damping
    5a. Input
    5b. Output
  6. Tag to follow
  7. Power
  1. Menu page indicator
  2. Rotation Speed 
    Use this setting to determine the target speed at which the Look At Rotator will attempt to turn (in degrees per second) when following its target’s location.
  3. Stay Upright
    Activate this to force the rotation to only take place in the horizontal plane.
  4. Rotation Strength
    Use this to determine the strength of the Look At Rotator – its ability to turn its affected object(s). Higher strength means the affected object will reach its target speed – and therefore its target direction – more quickly.
  5. Overall Damping
    Use this to specify the affected object’s overall resistance to rotation. If this is high, it will come to a stop much more quickly and therefore track its target more precisely – assuming it moves quickly enough to keep up.
  6. Tag to follow
    Enter the name of the tag you want this object to look at. Note that this is case-sensitive. If the tag already exists in the level, you can select it from a list of tag names by holding the imp tip over the field and pressing up or down on the d-pad to cycle through them.
  7. Power
    This is where you turn the gadget on/off.
Tweak Menu 2: Damping Specifics
  1. Tweak Menu Page 2 : Damping Specifics
  2. Min Distance
    2a. Input
    2b. Output
  3. Max Distance
    3a. Input
    3b. Output
  4. Strength in X
    4a. Input
    4b. Output
  5. Strength in Y
    5a. Input
    5b. Output
  6. Strength in Z
    6a. Input
    6b. Output
  7. Power

This tab includes three axis-specific rotational damping strength tweaks, in addition to distance range limits for the Look At Rotator. Damping strength affects the ability of the affected object to be rotated, with a low strength being easy to rotate and slower to come to rest. Higher damping makes rotation harder but more precise because the affected object stops quicker when it reaches its target orientation.

  1. Menu page indicator
  2. Min Distance
    Use this to specify the minimum distance at which the Look At Rotator will track its target. If the target moves closer than this minimum distance, the Look At Rotator will stop trying to rotate its affected object until the distance between the gadget and its target increases above the minimum again. In the example of a pair of spooky painted eyes following your character round the room, you might use this to stop them becoming too cross-eyed when you get close.
  3. Max Distance
    Use this to specify the maximum distance at which the Look At Rotator will track its target. If the target moves beyond this maximum distance, the Look At Rotator will stop trying to rotate its affected object until the distance between the gadget and its target closes to within the maximum again. Use this, for example, to stop tower defence weapons from trying to track enemies beyond their range.
  4. Strength in X
    This setting specifies the strength of rotational damping around the x axis specifically.
  5. Strength in Y
    This setting specifies the strength of rotational damping around the y axis specifically.
  6. Strength in Z
    This setting specifies the strength of rotational damping around the z axis specifically.
  7. Power
    This is where you turn the gadget on/off
Tweak Menu 3: Inputs & Outputs
  1. Tweak Menu Page 3 : Inputs and Outputs
  2. Affected Object(s)
    2b. Output
  3. Target Position
    3a. Input
    3b. Output
  4. Found Target
    4b. Output
  5. Scene Space Direction
    5a. Input
    5b. Output
  6. Power
  1. Menu page indicator
  2. Affected Object(s)
    By default, the Look At Rotator gadget will affect any object that it is snapped to. Instead you can connect a wire from this output directly to one or more elements in your scene and each will act as if this Look At Rotator gadget is snapped to it.
  3. Target Position
    It is possible to specify a target position for the gadget to face rather than a tag. Wire a “position output” fat wire from another gadget (e.g. the Laser Scope’s Hit Position) into this input and the affected object will turn to face that position instead.
  4. Found Target
    This outputs a true signal (1) if the gadget’s affected object is within range of a matching target (i.e. within the Min and Max Distances and therefore trying to face it); false (0) otherwise.
  5. Scene Space Direction
    This outputs the current direction that the gadget is facing. The presence of an input implies it may be possible to force a particular direction. (TBA)
  6. Power
    This is where you turn the gadget on/off

Lex Tips

Useful Tutorials

Beginners guide to the Look at Rotator

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.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: