How can I convert the mouse’s position on the screen to the world? I’m trying to make a “better” ball and axe game, but I don’t know how they got the position thing. I used mouse.hit x and y, and just put the z to 0. But as you can see, the mouse.hit is faulty.
also anyone know how to disable right click camera thing?
Sorry the right click thing was hard to explain. I don’t mean cameraToggle, I meant the game thinking you can hold right click to rotate camera, but you can’t, and it just bugs out the part.
The z position for the part is 0 in world space, I don’t even know how to do it in object space.
okay so, i figured a few things out. I set the camera’s min and max zoom to 20, which is how far away the camera is from the ball so it fixed the offset. Then I set the camera’s type to scriptable so it disabled the right click turning. The only thing left is figuring out how to set the mouse’s target filter to the map and the character.
I went back and tried doing the hit.position but with the z set to 0 and the target filter workspace, but the hit’s position if very far away and and it says the x and y is around 5000. What do I do now?