How to calculate and show OBB instead AABB


  1. How I can calculate and show OBB instead of AABB?
    Expected result in the right part of scene.

I found that I can pass precise flag into AbstractMesh.instersects() method, but I also want to show BB.

  1. How can I calculate OBB(or any baked mesh) rotation relatively to some another mesh or point on the scene?

I’am trying to implement face controller using tfjs-models/facemesh at master · tensorflow/tfjs-models · GitHub. From it’s ouput I can create CustomMesh and track its position using bounding box, but also I need rotation of “face”.

Sorry for my english and thanks!

Hi @gleb-cher
Sorry, i’m confused, is babylon not OBB already?
your “odd” result is simply from baking the mesh at a odd transformation :slight_smile:

1 Like