Hi Babylonians. I’m new here and trying to dig in deep. How can I cast shapes as different types? So, in my use case it would be (Walls, Windows, Doors, Cabinets, etc). Obviously, multiple meshes/shapes would be constructed to create a casement “window” for example. How can I wrap those elements in an object called “window” so I could tell if I am clicking on a door/window/or whatever? Or if a “window” is being dropped into a “wall”. Sorry if my explanation is rough
You can also extend Mesh or TransformNode and create your own fully parametric meshes.
You guys are awesome. Let me make sure I understand this correctly.
var CoT = new BABYLON.TransformNode("root");
In the code above. The “type” defined would be called “root” correct?
so if I did
it would return “root” as the mesh picked?
No “root” is not a mesh so is can not be picked but any of its children meshes can
@sebavan so then what is the purpose of “root”?
You can walk up the hierarchy after picking the mesh to see that the parent is of a particular group. Another approach maybe is to use
tags and tag the meshes with a specific string to categorize them.