TransformNode local coordinates system

Hi

I need to move my whole scene to a transform node. Move and rotate the TransformNode after.

The problem is that I got a point in World coordinate system and at that point, I need to check collision with Ray and put a model at that point.

But now my scene is move and rotated so how I can take a point from the global coordinate system and put it inside the transform node and make a ray cast inside TransformNode. It’s like I would like to use the rotated and moved coordinates system of TransformNode now.

I made a PG:

https://playground.babylonjs.com/#H86IXU

Id demonstrates the situation before the rotation.

If you uncomment line 37 this is going to make my new scenario.

What I must do to make the Sphere be aligned with the middle of the Plane or any other “point”.

Regards
Peter

OK never-mind found it :slight_smile: