Game logic - Path – Ylands
Lou Montana (talk | contribs) m (Text replacement - "[[Ylands " to "[[Ylands:") |
Lou Montana (talk | contribs) m (Text replacement - "\[ *((ftp|http)s?:\/\/[^ ]+)([^{])=([^}])([^ ]+)" to "[$1$3{{=}}$4$5") |
||
Line 58: | Line 58: | ||
= Example = | = Example = | ||
[https://ylands.com/community/profile/24-houp/ Houp] posted this on the [https://ylands.com/community/topic/28117-ropes-vs-bezier-curve/?do=findComment&comment=93346 Ylands Forum] for making ropes using a Path: | [https://ylands.com/community/profile/24-houp/ Houp] posted this on the [https://ylands.com/community/topic/28117-ropes-vs-bezier-curve/?do{{=}}findComment&comment=93346 Ylands Forum] for making ropes using a Path: | ||
[[File:Ylands Path Example 3.jpg|700px|thumb|right]] | [[File:Ylands Path Example 3.jpg|700px|thumb|right]] | ||
[[File:Ylands Path Example 1.jpg|400px]] | [[File:Ylands Path Example 1.jpg|400px]] |
Revision as of 17:27, 28 April 2023
Description
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
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
- This allows the path itself to move with a Position Animator and/or Rotation Animator.
- This also allows changes to be made to the Path position / rotation / scale using script tiles.
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:
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.