Good morning or good evening.
I’m back for a new problem (YES!!!).
On the one hand, I apologize again for my English!!
Well, I want to change the position of my camera on a mesh when I click on the mesh in question.
The mesh is imported from Blender.
I have positioned my meshes in different positions and used an ActionManager, but here comes the problem:
Here is an example of what I described (click on a sphere and the other on the rabbit3):
[https://www.babylonjs-playground.com/#QY1WYT#264]
There’s an error message : " rabbit3 is not defined " ??
There are no problems with the sphere.
Moreover there are things I don’t understand :
BABYLON.SceneLoader.ImportMesh(“Rabbit”, “/scenes/”, “Rabbit.babylon”, scene, function (newMeshes, particleSystems, skeletons) {
var rabbit = newMeshes [1];
…
BABYLON.SceneLoader.ImportMesh(“him”, “/scenes/Dude/”, “Dude.babylon”, scene, function (newMeshes2, particleSystems2, skeletons2) {
var dude = newMeshes2 [0];
What is the purpose of the :
function part (newMeshes,…)
var dude = newMeshes2[0];
var rabbit = newMeshes[1];
I’ve already looked at the Babylon course, but I still didn’t understand it.
It’s good to use the code again, but using it without understanding anything is useless!
Oh yeah, before I forget, on another post : [Change Camera Position], I asked almost the same question (except changing the camera position on a non-imported mesh) so the code keeps the same shape (with ActionManager), and I thank @Deltakosh for helping me .
Thanks,
ME_me