Game logic - Path – Ylands

From Bohemia Interactive Community
(Redirected from Ylands Game logic - Path)
Jump to navigation Jump to search

Description

Icon

This game logic can be used to measure a distance (used with Get Length Path tile), define a string to align entities (used with the Path Global Position tile), obtaining the angles of a twisting rope (used with the Path Global Rotation tile), a route for an animated object (used with a Position Animator), rotation directions (used with a Rotation Animator), or an area to manipulate the terrain (used with Terrain Volume).

Properties

Properties

Position and Rotation

  • The position and rotation refer to the game logic icon, rather than a specific point on the Path.
  • The Path Points also each have position and rotation.

Animated

Scale

  • Scale can be used to enlarge the whole path at once. Alternatively, the individual Path Points can be altered to change the overall shape of the path.
  • The Path Points also each have a scale value.

Reversed

The creator can select this to set the other end of the path as the starting point (marked with a green dot). This is also available within Path Editing Mode.

Closed

The creator can select this to connect both ends of the path, forming a loop rather than a line. This is also available within Path Editing Mode.

Path Editing Mode

Path Point Properties

  • Position
    • The creator can type in the path point coordinates instead of dragging the path points.
  • Rotation
    • Changing the Y rotation will change the alignment of the tangent points, changing the direction of the path.
    • Changing the X or Z rotation will change the height of the path near the path point.
  • Scale
    • With the aligned, mirrored, or free tangent mode, Scale changes the length of the tangent lines, causing a huge difference in the angles of the path.
  • Tangent mode
    • See Path Tools below.
  • Twist angle
    • This rotates the path point at an angle perpendicular to the path, causing twists. When the angle is obtained using Path Global Rotation, the Z rotation is affected.

Path Tools

  • Straighten the path between selected points
    • Hold Ctrl while left-clicking to select multiple path points. All path points can be selected at once by holding Ctrl while double-clicking one of the path points.
  • Set automatic tangent mode
    • This makes the path rounded near the path point, in a simple curve.
  • Set aligned tangent mode
    • This moves the tangent in or tangent out to be straight across from each other. This makes the path gently curved, rather than a sharp angle, which is only possible with the free tangent mode.
  • Set mirrored tangent mode
    • This sets the out tangent to match the in tangent, making the transition through the path point symmetric.
  • Set free tangent mode
    • Allows any angle for the path next to the path points. The angle can be modified by dragging the in tangent and out tangent (pink dots) or typing in new coordinates in the path point properties.
  • Reverse path
  • Close path
  • Place new points onto the path
    • New points can be placed between the existing points. Once placed, the points can be altered to change the path.
    • Right-click to cancel.
  • Add a new point after the last (selected) point
    • If no point is selected, it will add a point to the end of the path.
    • Right-click to cancel.

Related instructions

Example

Houp posted this on the Ylands Forum for making ropes using a Path:

Ylands Path Example 3.jpg

Ylands Path Example 1.jpg

Ylands Path Example 2.jpg

Notes

  • A path can be used to make an object move in a "forwards" direction by setting both the Position Animator and Rotation Animator to the same path, with all settings the same.
  • Path Points can be deleted within Path Editing Mode by selecting the Path Point and then pressing the delete key.