My Player doesn’t move when I click on the enemy. It can move around the board but when I click on the enemy nothing happens.
can you provide more information, like screenshot and code snippet?
if you say “nothing happens” when you click on the enemy, we could assume that somehow the raycast is hitting the enemy collider but somewhere in the code the logic breaks… (it’s an assumption that would need to be verified).
Also, try putting a lot of Debug.Log at various stages so you can see where the logic stops doing what you expect…
I’m a noob when it comes to programming so I’m not sure how to debug but here is my PlayerController Script, I also taught it my be an issue with the Raycast but this is exactly how they have it in the github code.
Your bug is that, in the fighter method, you put everything in the Start() method whereas it should be in the Update() method.
For recap, the Start() method happens once, and only once, whereas the Update() method is called over and over again (once per frame).
Holy crap … Thanks dude !
You’re most welcome
Good job working that out!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.