trophy 0
May 2025 18 posts
Sandbox.SceneTrace : api/Sandbox.SceneTrace
trophy 2958
Sep 2022 39 posts
Traces are imaginary lines. When you run a Trace you get a TraceResult - which tells you what the line hit.

So for example, if you, as the player, wanted to spawn a box. You'd run a Trace from the player's eyeball to 200 units in the direction that the player is looking. The TraceResult would show that it hit a point and now you know where to place the box.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.