Good evening everyone. I’ve implemented the lamp system from Lord of the Fallen. A lamp that allows you to see the world of the dead while in the world of the living. Everything works very well.
But I still have one last problem to solve. I have an invisible cone created in the material. It’s not a static mesh. It has an infinite length and extends from the player, as shown in this image.
The radius is calculated in my character’s blueprint. I use a line trace by channel, which allows me to obtain the distance from the object in the world of the dead.
Currently, the further away an object is, the larger the radius. Conversely, the closer I get to the object, the smaller the radius becomes. In reality, it’s not the radius that’s modified. It’s a cone.
Do you know what calculation would allow me to obtain a constant radius? In other words, whether the line trace touches an object at 10m, 20m, or 1m, I need my desired constant radius to always be the same size. It’s the radius that must adjust with distance so that I obtain a constant desired radius regardless of the object’s distance.
The desired constant radius equals the size of the “window” created by my lamp that allows me to see into the world of the dead.
Please