Wiki
  • Homepage
  • Player's Manual
    • Controls
    • Skills
    • Objects
    • Credits
  • Contributing
    • Getting Started
      • Programs and Files
      • Cloning the GitHub Project
      • Git Structure
      • Submitting Changes
    • Level Design
      • Basic Level Setup
      • Creating Static.tscn
      • Creating Collision.tscn
      • Stage Triggers
        • Using StageTrigger.tscn
        • Camera Triggers
        • Culling Triggers
        • Death Triggers
        • Dialog Triggers
        • Jump Triggers
        • Path Triggers
        • Automation Triggers
        • Drift Triggers
        • Foothold Triggers
        • Platform Triggers
        • Sidle Triggers
      • Stage Objects
      • Placing Objects Along the Path
    • Playtesting
      • General Shortcuts
      • Debug Menu
      • Free Camera Mode
      • Using the Editor for Playtesting
    • Submitting a Bug Report
    • Documentation Style Guide
  • Asset Guidelines
    • Source Files
    • Asset Ripping Reference
      • Original Model Files
    • Asset Editing Reference
      • Editing Environment Models
      • Editing Collision Models
      • All About Curves
      • Exporting Models from Blender
    • Resources Files
      • CameraSettingsResource
    • Miscellaneous Notes
  • Godot Guidelines
    • File Guides
      • File Structure
      • Naming Files
    • Project Settings
      • Tag Reference
      • Layer Reference
    • Particle Effects
    • Audio
  • CODE GUIDELINES
    • Language Specifications
    • Formatting
    • General guidelines
    • Attributes
    • Floating Point Numbers
Powered by GitBook
On this page
  • Setup
  • Usage
  1. Contributing
  2. Level Design

Placing Objects Along the Path

Using the PathFollow3D node to help place objects better.

PreviousStage ObjectsNextPlaytesting

Last updated 8 months ago

All of Secret Rings gameplay uses an underlying Path that sonic moves along for the entire stage.

You can use the path and a PathFollow3D node in the editor to place objects quickly and efficiently by simply "sliding" along the path.

Setup

After importing the main Static.tscn, make sure to enable "Editable Children" on the the imported scene.

Find the paths for the stage from the Static.tscn node. There are often multiple paths for a given level located under a Node named "Path."

Find the path that covers the section of the stage you are working on. You can select a path and press [F] in the 3D view (or double click the node's icon in the tree view) to snap the 3D view to the selected object.

Look for the control points that represent the path to see where it travels.

Once you have the path you need, right click it in the Scene Tree and click "Add Child Node."

In the Add Child popup, search for "pathfollow" and select the PathFollow3D node.

You are now set up. Focus on the new node (using [F] or double clicking its icon in the Scene Tree) to see where it is.

Usage

You can treat your PathFollow3D Node like a platform that moves along the stage, placing objects as it travels. Use the PathFollow3D Node's "Progress" value to move the node along the path.

When update the "Progress" value, click and drag on the number part of the property instead of using the slider to get finer control. Press [F] as needed to re-center the PathFollow3D node in the 3D view.

Once you position the node roughly where you need the item, [RIGHT CLICK] on the PathFollow3D node and select either "Instantiate Child Scene" or "Add Child Node" as needed.

Now any node you add will be positioned with its origin directly on the main path.

Move the object until you it appears as it needs to. With both "Local Transform" enabled in the editor and "Tilt Enabled" in the PathFollow3D node options, you can have objects follow the curve and tilt of the main path.

One way to do this is to can [CLICK] and [DRAG] the object node in the Scene Tree to where it needs to go.

Alternatively, if the Scene Tree is cluttered with objects, it may be easier to [RIGHT CLICK] your object node and select "Reparent" instead.

That's it! Keep moving the PathFollow3D node and placing objects as needed to add the rest of the stage's objects. Once you are finished placing objects, remember to delete the PathFollow3D node from the Scene Tree.

After you are finished placing your object node, it needs to be moved from Static to the Act node. Typically you will do this by reparenting the object node to a node.

Section
Some objects might have their origin in the center instead of at the bottom.
Remember to Keep Global Transform if you use Reparent Node option.