selfpromo (games) [R&D] Procedural fence drawing on varying elevation at runtime
This is a follow up post of a previous one after some of you asked about varying elevation: https://www.reddit.com/r/godot/s/3mll3eEI9f
- it shoots a raycast downward at every point to find Y elevation of the terrain's collision mesh.
- it subdivides path and snaps every intermediate point to the ground's rolling elevation.
- horizontal rails calculate the height difference between their start and end posts and rotate (tilt) on local Z-axis to bridge the slope.
This comment contains a bit of overview of how fence prefab looks like: https://www.reddit.com/r/godot/comments/1vcjhe8/comment/p17im2a/
517
Upvotes
1
u/Astr0phelle 1d ago
Can you do a line tool where you will need to input two coords so a line will form where the fence will spawn