Hi I would really appreciate if anyone could help me to write a script to move my piece in a game if the player gets no 1 on the dice I know the logic but I am not familiar with c# and unity methods.
Its a simple game where the piece will be in the centre and there will be 4 players the player can roll the dice till it gets no 1 and if he gets no 1 the piece will move opposite side of the player and it will continue among all the players till the piece doesn’t fall out of the board.
I have mapped objects name wave points to navigate through the board I have referred a YouTube video similar to make a board game but its way different and I can’t understand
what does transform .position do so I am not able to implement
private void Move()
{
if (waypointIndex <= waypoints.Length - 1)
{
transform.position = Vector2.MoveTowards(transform.position,
waypoints[waypointIndex].transform.position,
moveSpeed * Time.deltaTime);
if (transform.position == waypoints[waypointIndex].transform.position)
{
waypointIndex += 5;
}
}
}
}
this was from the YouTube video I referred.
Please help me and pls leave down below your discord or any social media handle I can connect to understand.

