Quantcast
Channel: Answers by "Kleptomaniac"
Viewing all articles
Browse latest Browse all 90

Answer by Kleptomaniac

$
0
0
Hey there, Not super sure what you're asking here, but I'll give it a crack. Do you just want to make it so you can open the gate with an arbitrary number of keys as opposed to just E? if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.Space) || //Other keys you want to enable) { if (!animation.isPlaying) { //Gate open function here } } This will allow you to have different keys in order to open the gate. Also, I would suggest using KeyCode to define keys as opposed to string lookups, as these can be slow. :) Hope that helps, Klep

Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>