3
\$\begingroup\$

I'm trying to do a board game in unreal engine 4. I've set up pawns and a board actors. However, I would like to be able to decide on which case of the board the player clicked. The board is one piece and I'm not sure splitting it up would render it nice.

Is there a way to get back the 3D position of a click in unreal engine ?

Thanks for any help !

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Cast a ray in your player controller.

Your PlayerController blueprint that controls your player pawn has special blueprint nodes exactly for this use case. The following outputs the hit location in world coordinates whenever the player clicks on something that blocks traces on the visibility channel:

enter image description here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .