10-03-2012 08:38 AM
There are examples on how to rotate an object independently like the solar system one. However, I am having a challenge in that I have created a face of a rubik's cube that has several little cubes in ti and want to rotate just one row of the little cubes across the face. Does anybody know how to to rotate multiple objects about a single rotation point in a 3D Picture control ? See photo below.
Solved! Go to Solution.
10-04-2012 08:47 AM
Hi id,
Take a look at this example, this may help out. This sounds like a very interesting project!
https://decibel.ni.com/content/docs/DOC-8262
10-04-2012 09:19 AM
Thanks Matt. That was a great example of how to rotate a single object in multiple ways. I appreciate your answer as it gets me thinking more.
My challenge is to be able to rotate several cubes all at the same time but as a face, not each at the same angle. So, I guess that I have to pick a point as the axis to rotate the object about and then have ach one rotate at a differnt angle in order to keep the face flat.
I just don't know how to rotate a cube about a point that is off from the cube in a scene. Here is a jpeg of my challenge. I want to rotate each plate of cubes by a user control.
10-04-2012 09:25 AM - edited 10-04-2012 09:29 AM
You can group objects into a scene and then if you rotate the scene instead of the objects they will maintian their relative positions. You can also retain a reference to each individual obhject and rotate them individually, thus allowing also objects within a group to move or rotate relative to each other.
To rotate an object whose position is away from 0,0,0, first Get translation, Get Rotation, Undo Translation (Clear translation is the name of the function I think) Apply rotation change (if rotation is a delta instead of absolute), Re-apply Translation and voila.
You can also retrieve Objects by name allowing easy access to either single or compound objects as required.
Shane.
10-04-2012 09:51 AM
Excellent answer. Thanks