Please or Register to create posts and topics.

stopping a raycast at a reflection cube

For a while I've been trying to make a new laser mechanic. I've learned some scripting now, and I think I get the idea behind how I can raycast. To do this, I can use the traceline function and use a directional function I made earlier with the fraction returned from the traceline to find the exact position the raycast hits. Unfortunately, traceline does not work on entities. In a previous thread, I was told that traceline was unreliable, and one example of why was that there is an entity that is caught by it as a glitch. I've been experimenting a lot with traceline, and I find it reliable enough to work with. I was thinking that I could try parenting this entity to a reflection cube to catch that on the traceline in my raycast. Does anyone know what that is if it exists?

The entity is func_weighted_button. But it needs to be solid to be caught by the raycast, and if it's solid it'll cause interpenetration errors with the cube.

If you want a new laser mechanic, I'd recommend looking at Sendificate.

Falsi sumus crusto!