Comments

Log in with itch.io to leave a comment.

Hello! How setup it?

Hi! Create an empty object, name it "FlashlightController", add the script component to it from this archive. Then add a spotlight object as a child to the FlashlightController object. Assign references in the script component if needed. Then place the FlashlightController object in the same position as your character's camera is (do not make it as a child of the camera or character, let it be by itself). Then in PlayMode, check if the Spotlight from the FlashlighController object is pointing to the right direction, if not - adjust its rotation while in PlayMode and when left from the PlayMode - assign the previous values to the Spotlight's local rotation. You can also tweak the position offset, if you like.

Thank you so much, really appreciate it.

I hope this helps! Let me know if you get into further trouble setting it up!

(1 edit)

This is really cool! I'm definitely going to use it in my submission to scream jam 2024! Man, Looking at all your assets I'm really impressed! You definitely have a talent. :)

Hi! Thank you very much!

THANK YOU, for making this script! Keep up the good work man!

Thank you for using it!

super cool, but I'm having issues setting it up, I might be missing something of making some silly mistake but the console says, "The type or namespace name 'PlayerInput' could not be found" I am a new developer so I don't really know what to do, can someone help me out?

Hi!

I forgot I was getting keycodes from another class, that isn't present in this package. I have changed the code a small bit, so you'll need to assign a keycode for toggling on/off the flashlight in the FlashlightController component now. I have updated it, so you can just download it again :) I wrote this controller script a while back when I had little idea of what I'm doing, haha. I'll rewrite this script soon, to meet the current standards, haha

Thanks 

is this not available anymore?

Hi! Seems like the html of this page got corrupted. I'll have a look now!

The html didn't get corrupted. Looks like something has happened to the downloadable file, as it was missing. I have re-uploaded it, if you'll have trouble setting it up, please let me know!

great, thanks for the quick support :D

You're always welcome! I wrote this script in the very beginning of me learning Unity API, so you might find some silly things there. I'll improve it very soon! If you'll have ideas for this controller, please let me know! :)

This is great dude! and it's super simple too! Thanks!

Thank you too! I'm very happy that you found it useful for your project! :)