Here goes my pride as a coder. I am TOTALY rubbish at this 3d molarky! Any help is totaly appreciated, i am attempting what i beleve should be terrably simple:
i have a box… i want to rotate it in a single plain around it’s center. If i run a getCenter i do indeed get the point at it’s dead center. However when i do:
Box body = new Box("Body Of Dancer " + danceNumber, new Vector3f(), 2,.5f,2);
i end up with a box which has rotated around it's source vector (that of position 0,0,0). Am i being an utter retard and doing somthing daft? If so i TOTALY appologise but if you would be so kind as to point it out i will be eternaly greatfull.
I had this same problem, and I can assure you, I’m not retarded
Use one of the other constructors that Box has (one that doesn’t set the center), rotate it, and then set its position using setLocalTranslation. That way jME will first rotate it about the center point, and then move the rotated box.
Thank goodness it wasnt just me… I think i have worked out how the transformes actually work… they appear to work arrount the local 0,0,0… if ya get my drift, basically you have to align the center of the center item of your node-tree with the center point of that tree… (that sounds complecated :()… umm… if ya make a box, make sure it’s center is at 0,0,0 and then you can rotate it around it’s centerpoint
Thank you for the intel, it seems to be working. I put my box in the middle, attached it to a pivot node, and it was rotating.
However i did the same exact thing in my own class, and the box didn't move with the node. I dont know the problem yet, but its getting late, and i'm too tired to think... If you dont see a new post in 24 hours, then its alright :)
Thanks again, and good night.