First of all I’m a newbie,. So I’m sorry if my question is pretty dumb :rolleyes:
I just hope you can help me with this one.
How can I enable input when a ray hits an object(in my case a lamp) so if I press “F” I can turn the light ON/OFF and disable the input when the ray is not hitting the object so if I’m away and I press “F” I cant turn the lights ON/OFF.
with a helpful message that says “press F” when the ray hits that certain object.
ok so heres my graphs.
FIRSTPERSON LINE TRACE
and heres where I’m having some problem,. so I can enable input but I dont know how to disable it when the ray is not hitting the object. So once the ray hits the object, it stays enable all the time and I can toggle the light even if I’m away.
if I can just disable it when the ray is not hitting the object.