Select target for method with mouse click

I realize there is probably an obvious solution for this, but I’m not sure what to ask to find the answer. I am currently making a kind of text rpg. I have the attack button and can figure out the method. On pushing the attack button, I need to be able to choose from a set number of targets and perform the attack method on the selected target.

Any help or pointers would be greatly appreciated. Thanks,

Hello.

I think this tutorial is exactly what you need:

(#3.3 Unity RPG Tutorial - Picking a target)


As youare just starting developing (I supose for your questions) i strongly recommend to watch the full tutorial serie, to learn a lot of things you dont even know exeist :smiley:

Good luck!

Ps: Dont try to go fast, dont hestiate to spend hours just watching (if you dont understand everything, dont worry, just keep watching) Every time you watch the tutorials will learn something new.!

Edit: I don’t know who this will help in the future, but try checking your camera settings and GameObject positions. Mine were incredibly jacked up and were confusing my Raycast. That is why I was having so much trouble.

Good luck, future newbies!