Mathan Kumar
Mathan Kumar

Reputation: 1

How to find the position of objects in java 3d..?

I am using java 3d in my project. I have placed many 3d objects in a 3d environment which are movable using mouse. After moving the objects how can I trace the new position of the moved object? Is there any method in java 3d to do so. Plz help me. Thnx in advance..

Upvotes: 0

Views: 2406

Answers (1)

pät
pät

Reputation: 543

Transform3D transform = new Transform3D(); 
Vector3f position = new Vector3f();

yourObject.getLocalToVworld(transform); 
transform.get(position);

position contains your result.

Upvotes: 3

Related Questions