0
\$\begingroup\$

I want to replicate the laser pointer dot as in RE4:

enter image description here

Here is a video that shows the laser in action.

I have tried to replicate it using a spotlight. The problem with the spotlight is that its size can only be controlled by its distance to the object. I'm struggeling really hard with keeping it at just the right distance.

Since this is such a big problem, I would first of all like to ask if a spotlight is the preferred way to create such a laser dot.

Thank you.

\$\endgroup\$
2
  • \$\begingroup\$ Presumably you considered using a projector or decal placed at the end of a raycast (similar to how one would place a bullet hole, but with additive blending)? \$\endgroup\$
    – DMGregory
    Jul 8, 2020 at 21:30
  • \$\begingroup\$ @DMGregory I'm using the URP, so a projector isn't an option. I have not tried a decal yet. I will investigate on it, thank you. \$\endgroup\$
    – tmighty
    Jul 8, 2020 at 21:32

1 Answer 1

0
\$\begingroup\$

I'm now using a Screen Space Decal Shader that works with URP, specificially this one:

https://github.com/ColinLeung-NiloCat/UnityURPUnlitScreenSpaceDecalShader

I will update my answer with the details as soon as I have it completed. I'm still working on the details of an implementation.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This answer would be even better if it walked through the steps of how to use this to create the laser pointer effect. \$\endgroup\$
    – DMGregory
    Jul 10, 2020 at 17:47
  • \$\begingroup\$ @DMGregory I have updated my post accordingly. \$\endgroup\$
    – tmighty
    Jul 10, 2020 at 18:08
  • \$\begingroup\$ "I will update my answer" - do you still have an update pending? \$\endgroup\$
    – DMGregory
    Dec 3, 2021 at 1:03
  • \$\begingroup\$ No, I have not worked on it yet any further. \$\endgroup\$
    – tmighty
    Dec 3, 2021 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .