Quantcast
Channel: Questions in topic: "side-scrolling"
Viewing all articles
Browse latest Browse all 99

(2d) Enemy not killing player if player stand still?

$
0
0
Just learning and I have followed some tutorials and am just tyring to get basic mechanics of a 2D game going. I use Uscript ( Visual Scripting Tool ) so I will just have to explain what my code is. My controller is an edited first person controller to 2D My enemy is a prefab sprite with a box collider that moves via moving the game object under global update. I then have a script that basically just says OnTriggerEnter of the Enemy and Trigger is instigated by Player, then do blahblah This seemed to work every time when you run into the enemy or jump into it. But I noticed that if I just stand still with the character, the enemy walks past the character and nothing happens. For some reason, it is only working when the player is moving. Any tips advice? Or am I going about this in a poor way? and please remember I use a visual scripting tool so explaining in logic instead of code would really help! thank you!

Viewing all articles
Browse latest Browse all 99

Trending Articles



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