I am loading a scene where I'm trying to click on an object using pickResult.pickedMesh. I however get "null" when I check it on console.log. i.e. it is not hitting anything in the scene.
Here is the code snippet. Have attached the index.html file as well. I was unable to upload the complete project to the playground, as I'm not sure how to upload the .babylon scene file and the .jpg files.
//When pointer down event is raised
newScene.onPointerDown = function (evt, pickResult)
{
// Check if pickResult(); did hit anything by printing it on console.log
console.log(pickResult.pickedMesh)
// print the info of the clicked object
if (pickResult.hit) {console.log(pickResult.pickedMesh)} };
Would appreciate if anyone could help out on what could be possible wrong? Thanks.
index.html