C
C#2y ago
karkar

❔ flashlight strength

how would I make it so that my flashlights light gets dimmer the closer it gets to an object https://paste.ofcode.org/gq5qhuX7Am2BwR3n4i8W6B
9 Replies
TheRanger
TheRanger2y ago
first u need to get the distance between the flash light and the object with Vector3.Distance method
karkar
karkarOP2y ago
can you elaborate pls im very new
TheRanger
TheRanger2y ago
look up the api site of unity of this method it gives you an example
karkar
karkarOP2y ago
but its not any object its just the general light of the flashlight on everything
TheRanger
TheRanger2y ago
try asking in $unity
karkar
karkarOP2y ago
ok thx
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server