Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test to add a mesh as a children of a camera
var weapon = BABYLON.Mesh.CreateBox("weapon", 0.2, scene);
weapon.scaling.z = 5;
weapon.material = new BABYLON.StandardMaterial("wMaterial", scene);
weapon.material.diffuseTexture = new BABYLON.Texture("images/weapon.png", scene);
weapon.position.z = camera.position.z + 10;
weapon.parent = camera;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.