Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Pivoting about an axis which is not in the middle of the object

Author
Message
M4Rc0
18
Years of Service
User Offline
Joined: 15th Nov 2006
Location:
Posted: 15th Nov 2006 21:18
I know that pivoting about an axis which is not in the middle of the object is probably done by making a dummy object as the pivot, hiding it, then attaching the object you want rotating to the pivot as a limb, then offsetting it.

Something like this:
`pseudo code

make object cube pivot,1
hide object pivot

make object box wall,xsize,ysize,zsize
make mesh from object wall,meshnum
delete object wall

add limb pivot,limbnum,meshnum
offset limb pivot,limbnum,x,y,z

yrotate object pivot,angle

BUT... IF I CAN'T DELETE MY OBJECT FOR SOME REASON?
can i create an hidden limb (clone of my object) to the pivot end then position my object exactly like the pivot limb?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 15th Nov 2006 23:21
every object has a limb zero.
just offset the object by calling its root limb
then use fix object pivot command.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Nov 2006 23:39
EZrotate also makes light work of this, you can use the Vector rotation commands.



Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Nov 2006 09:11
@M4Rc0

With a little bit of trig you can do it quite easily.

Pick a point on a plane that you want to pivot around. In my example I will use the x,z plane so I will be rotating around the y axis at point (50,0,100). Pick the distance from the point that you want the arc to be (the radius actually). And pick an angle to rotate.

Then, using x = radius * cos(angle) + x point to rotate around
and z = radius * sin(angle) + z point to rotate around, you can easily do your pivot. If you want the object to face the point it is arcing around then use the command POINT OBJECT to keep it facing the point of pivot.

Here's an example:



Enjoy your day.

Login to post a reply

Server time is: 2024-11-27 04:35:52
Your offset time is: 2024-11-27 04:35:52