Description
Returns the position of the nearest solid surface to a given world position, calculated by raycasting outward in all directions and returning the closest hit point. Useful for wall-detection logic, surface-snapping effects, and proximity-based mechanics.
Snippet
Closest Wall Position(Position Of(Event Player), 10);
Properties
Returns: Vector
Parameters: Position, Max Range
Position
Type: Vector, Default: Vector(0, 0, 0)
The world position from which wall detection is performed.Max Range
Type: Number, Default: 10
The maximum distance in meters to search for a wall. Returns Null if no surface is found within range.