//get dynamicObjects set from server
//dynamic objects are abstract objects which are
//compiled by 'comp'-object into geometries
try {
dynamicObjects = worldRemote.getDynamicObjects(100, new Vector3f(0,0,0));
} catch (RemoteException re) {
System.out.println("! (get dynamic objects): " + re);
}
//update positions of all dynamic objects
Iterator<_DynamicWorldObject> iterator = dynamicObjects.iterator();
while (iterator.hasNext()){
_DynamicWorldObject dwo = iterator.next();
//set position from abstract world object
geo.setLocalTranslation(dwo.getPositionInWorld());
}
}
on debug output 1 i get the correct position but on debug output 2 i get position [0.0 , 0.0 , 0.0]
can u help me plz
tell me if u need more detailed description
What server are you getting the nodes from? Is it JGN based or a custom RMI or Socket stuff? Maybe the client is not getting the vectors and matrices correctly from the server.
I don't see the problem necessarily. My guess is that there is something with the API that make dwo and geo different. Maybe your comp object does not what you think it does, or maybe the geometry is correctly set up locally, (in (0,0,0)) while the dwo is not, and this is not an error. Who knows, but it can only be in those places, since that is the only calls you have in your code.
@here was my mistake - i constructed the sphere (testMovingBall^^) with a location vector
i dont know what was wrong with that ... maybe someone can help me to understand
The reason is because the constructor Sphere(name, center, …) creates a Sphere at location (0,0,0), but the geometry is a set of points centered at center. This might seem weird, but is useful when trying to rotate a sphere on something that is not its center (like an orbiting planet and more)