Raycast not accurate

This is a resolved problem but I figured I’d make a quick post just in case someone else stumbled onto the problem. I’ll start with a summary. If you are picking an object using raycasting and the selection seems inaccurate, check to make sure you haven’t inadvertently set one of your camera Scale values to something other than “1”.

I’m new to PlayCanvas and have been experimenting with scenes as a way to learn. So the scene isn’t particularly interesting, but I’ll link to it anyway. Just go into the camera setting and change any Scale value to something other than “1” and you’ll see the problem.


What’s the reason for scaling the camera?

There was/is no reason. It was changed inadvertently - probably early on when I was moving the camera. Frankly, I’m not sure if there is ever a legit reason to scale the camera. If there isn’t, then that should be a frozen option and not editable when the camera is selected.

I only posted what I ran into for future reference that might assist others.