I don't know about any "ObjectBehavior", but I suspect you are speaking about OrbitBehavior. In that case, I can tell you that I am using setRotationCenter(Point3d) without any problem. The OrbitBehavior is rotating EXACTLY around the center I'm specifying, without any need of strange workarounds as the one you show me below.
However, I think I know the problem you have run into, because I had it too. So let me explain what I think is happening, and if it's not like that you can correct me. The problem is that the point you specify as rotation center is not the one that you expects to be. How are you obtaining the rotation center ? Do you use something like ((BoundingSphere)<your object>.getBounds()).getCenter() ? In that case, I can tell you that the center is not the one you expect, except the case when you have set manually the bounds. Actually, I found quite annoying that getBounds is not returning the closest bounds of the object. In my program I am turning boundsAutoCompute off and calculate and set the bounds by my own, so that I know that they have correct values. All the problem comes from the fact that, by default, the bounds auto compute uses bounding spheres instead of bounding boxes, and that makes objects to look bigger and displaced. Cheers, Florin -----Urspr�ngliche Nachricht----- Von: Alex Bowden [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 30. Januar 2003 03:00 An: [EMAIL PROTECTED] Betreff: [JAVA3D] objectBehaviour.setRotationCenter() spurious shift Hi all has anyone successfully managed to modify the setRotationCenter() method of ObjectBehaviour so as to avoid the spurious shift of the new center of rotation onto the center of view. Andrea Tartaro [[EMAIL PROTECTED]] back in 04/04/2001 replied to a query to the group on this topic agreeing that the behaviour was odd and suggesting xtrans += (rotationCenter.x-center.x); ytrans += (rotationCenter.y-center.y); at the beginning of setRotationCenter() but this doesnt do it for me although it does look apparently reasonable. I suspect that the problem is to do with the Z depth of the new center of rotation Any pointers please THanks Alex =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
