raytracing? how do you select a chess piece but clicking it

raytracing? how do you select a chess piece by clicking it

is it called raytracing?

im trying to set up the basic controls for a 3d chess game but i dont know if this is the right way to do it

i want to be able to click a chess piece and click a space on the board for it to move there
i also dont know how to detect the click of the mouse on the specified area of the chess board

any advice would be great thanks

If you are wanting to select something in-game by clicking on it, then you’re wanting Raycasting, not tracing. Raytracing is something different altogether.
Raycasting is awesome.

ok thanks is there anything else i might need to make this work?

go read up on raycasting and then return with followup questions if you have any.

There’s a lot going on for what you’re suggesting, and Raycasting is a versatile tool with a lot of different functions and variables. Like Laperen said, go read up on it and if you have any specific questions, we’ll be happy to help.

Check out this tutorial: 3D Physics - Unity Learn

I hope you meant “By” and not “But”

(also I just tried to find a SFW image of a butt for the laughs but imgur was a bad idea)

Take a look at this post: Finding the gameobject a gameobject is placed on? (C#) - Unity Engine - Unity Discussions

ok well i have a flow chart of how i want certain things to be programmed and i have the 3d models

i want to build this for android how would the raycasting work for touch screen coordinates and 3d space?