@MrMen This is genius, the only thing I don’t understand is the part where it says:
Cast the ray against “RayCastLightTest” >>> what is that? is it a group or what? and if it is what is inside it exactly?
Also if it’s possible to send me this test you made so I can study it better, I’d really appreciate it.
You can upload it on google drive for example and then put the link here or if you’d like you could just email it directly to me in a .zip file maybe: contactcoriandergames@gmail.com
Whatever works with you I’m ok with.
Thank you so much for helping out, I never thought this was possible, it opens a lot of possibilities.
Alright I’m just waiting for your input on this part that says:
Cast the ray against “RayCastLightTest”
I’d like to know what is “RayCastLightTest” so I can test the whole thing because without knowing what this is, the whole scene just crash when the preview starts?
I’ll be waiting for you…
Edit 1: Wait is the “RayCastLightTest” is that yellow object in your example?
I just attach it to the light? … I’ll be trying that now, I think that’s it
Edit 2: Nope still not working…
Edit 3: Alright that’s cool, I managed to get it to work, well kind of… I just made a group and I added the platform, player and light to that group and now it works but kinda…
There is a crash that happens when the light is very close to the player, the whole scene just crash and I’m not sure why, I’ll try using distance and see if that works…
Edit 4: Yup I confirm using distance fixed the crashing issue just fine, I also noticed that it’s working almost perfectly with multiple light sources and without using any “for each object event” which is epic because that means less calculations and better performance.
Now I said in Edit 4 “almost perfectly” and I’m super satisfied with the results but there is 1 instance where it doesn’t feel like very accurate, let me explain this:
This might be fixed using a blur filter for the light but I’m just nitpicking at the moment to get it to perfection (If we can for sure):
Here is the first case:
As you can see the light is intersecting the player and the color is not changed, it should be changed because it’s intersecting one of the points on the edges.
Here is the second case:
When the light angle is close to 90 degree, it’s perfect
I think once the light angle becomes bigger, it’s less perfect (Case 1) I’m not really sure…
If there is anything we can do about that, let me know about it…
But at this point, I’m super satisfied with the result
and I can’t thank you enough for such a genius idea : )