How to get vertex world position on JM3 [SOLVED]

I know this question came a lot, but I could not find the correctly awnser on JM3 docs and forum.
There is one for JM2 using trimesh, but it seens not to apply to JM3.

The problem:
I have a bullet, it has a determined vertex that I want to use for custom collision.
I am getting wrong position with :

Vector3f[] vertexArray = BufferUtils.getVector3Array(thisbulletGeometry.getMesh().getFloatBuffer(VertexBuffer.Type.Position))
Vector3f location = vertexArray[index];

It seens to be scaled somehow, and also, its not considering the rotation and position from the mesh…

I also tried the Transform :

        Vector3f location = vertexArray[t];
        Transform tt = thisbullet.getWorldTransform();
        location = tt.transformVector( location, null ) ;

This time it gets rotated and translated, but still scalled in order of I dont know 100 ?
How could I get this ?

Sounds like a job for

Spatial.localToWorld()
1 Like

Yep, that did the trick :

thisbulletGeometry.localToWorld(location,location);

Thanks @zzuegg !