I've been trying to make a script to pick up weapons and I'm just testing it to see if all the triggers work and whatnot and the GetKeyUp isn't working.
Heres the script on the player:
and the weapons:
I know the triggers work because I tested them but when I added the next if GetKeyUp it doesn't perform either of those functions. Equip stays false and I get no picked up weapon message in the console. But I also get no error messages. Can anyone see what I am doing wrong?
asked May 03 '12 at 06:10 PM
@cidmodder You would have to put it in a OnTriggerStay function, right now you would have to release the mouse button the same frame the trigger gets triggered. Change that to stay and you should be good to go