When creating script I had a problem of how to make if statement for each pressed key work every time Updater is called...I solved it by adding a variable that will store a key to be assign inside Unity itself as a component.
For now I figured out how to write about 4 lines of code that will make the spotlights follow the player..Unfortunately it only follows player as long as the key is pressed down... Therefore I need to figure out how to make it follow the player after single key has been pressed.
Also when I put LookAt() function inside if statement for some reason it is checked only once and then it doesn't update which means player would have to press the key constantly to make the spotlight follow...
No comments:
Post a Comment