How to rotate object around a point?
tshaq80_752a50b069
Posts: 35
Given a vector as center of rotation, how could I rotate an object around it Y degrees in the y-axis?
Comments
Just parent the item to a null object (tool bar or create menu) placed at that vector. Rotating the null rotates the child object.
This script might help you, to see it working you need to create two spheres, name them, "sun", and "earth", run the script.
It seems like you are constructing
a privat ? not
anonymousfunction called Orbit
- can I have acces to it from outside like from the main anonymousfunction and how do I execute it if so?
This seems to start an endless loop right?
As a matter of fact, all member methods are public. All that is needed to access them is an instance, like:
The
run
method just contains 3 statements, no loop. It was supposed to be a Fluent like method but forgot to returnthis
.HTH
Sorry it's my lack of knowledge of this syntax that has led me to believe that this is an endless loop. I'm shure its an insult to any programmer.
Actually it is not a syntax, it's called a Design Pattern, a fancy name to help you write S.O.L.I.D. code.