I was trying to make a script to follow a custom cursor for a 2d game I’m making in the 2020.2 version of unity and I got the cs1002 error (mainly where it says ScreenToWorldPoint{ Input.mousePosition} ) and I can’t figure out what I did wrong. If anyone has any suggestions to make a change to the code, please respond.
Here’s my code:
`public class custom_cursor : MonoBehaviour
{
Vector2 targetPos;
// Should prevent the cursor the cursor that naturally exists without the input of a 3rd party from showing up.
void Start()
{
Cursor.visible = false;
}
// Should make the cursor image move around the screen of the game.
void Update()
{
targetPos = Camera.main.ScreenToWorldPoint{ Input.mousePosition}
transform.position = targetPos;
}
}`