I still have a few problems with my work, so I have some of these ‘do my work for me’ questions >:)
I’m trying to cast a ray from my imported character.
And here is the first big issue:
in the debuglayer (activate in line 164) -open nodes- you can see, that more and more rays are added to the scene. Of course it lags pretty fast. Is it, because I call the function in an import-mesh function? How can I avoid that?
I want to bind the ray to the head of the character. So far I did it with binding the ray to the character and changing the hight of the casted ray (line 139).
With the scaling-function (line 146) I found out, that I can access the head of the character with skeleton.bones, but I can’t bind neither the ray nor the camera to the head with:
- rayHelper.attachToMesh(bot, localMeshDirection, localMeshOrigin, length);
- camera.target = skeleton.bones;
because the scene then doesn’t start.
I’m creating the ray-function in line 135 and calling it in line 148.
As always I thank you in advance for your help.