Hello everyone!
It is a general question. I am new to Babylon.
I found only one example here of the checkers game where board and checkers were made entirely in Babylon. All calculations there are made based on code that created mesh. What if I want to make and texture, let’s say, my own board, checkers, and surroundings in Blender? How do I apply dimensions, vectors etc. to my imported board?
Will I need to create another board in Babylon and calculate everything based on it and make it invisible? What would be approach to this problem?
My approach to get dimensions of imported model is to use BoundingInfo:
const boundingBox = mesh.getBoundingInfo().boundingBox;
const maxMeasures = boundingBox.maximum; // is Vector3
const minMeasures = boundingBox.minimum; // is Vector3
Edit: If you want to change size, you can simply use scaling
-property on your imported meshes. Or scale it in blender and apply Scaling.
2 Likes
Transform node is good for scale/position/rotation
Welcome to the Babylon community! Since you’re new to the framework, I also recommend going through Introduction to Babylon.js Features | Babylon.js Documentation (babylonjs.com) as its a great way to learn the features 