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 / Moving an object in the direction it faces

Author
Message
Woarther
14
Years of Service
User Offline
Joined: 21st Feb 2010
Location: Sweden
Posted: 27th Feb 2010 15:31
Is there a command for this? I tried using move object 1,1 but it didn't move the object in the direction it faces(in other words, based on the object's angle).
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 27th Feb 2010 18:00
That is the command to do that. Perhaps you have rotated the object, but did not fix the pivot(?) If that's not it, try moving it farther, so it will be clear which way it is actually moving.

Woarther
14
Years of Service
User Offline
Joined: 21st Feb 2010
Location: Sweden
Posted: 27th Feb 2010 19:15
What is a pivot?

This is my code for it. What am I doing wrong? :p

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 27th Feb 2010 23:17


Try that?

Windows Vista 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 27th Feb 2010 23:37 Edited at: 27th Feb 2010 23:43
If it were me:




This should move the object in the correct direction.


EDIT:
Quote: "What is a pivot?"

Sometimes when you load in objects into DBP, they are not facing the way you want. You can rotate the object to get it to point the right way, and then use the:

FIX OBJECT PIVOT Object Number

command. At that point, it is viewed as if it is at angles 0.0,0.0,0.0, so if you Y rotate it 90 degrees, it is from that point and not from the original angle when it was loaded in. Does this make sense?

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 1st Mar 2010 11:27
try:



TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Mar 2010 16:17
Quote: "What is a pivot?"


A pivot is the point around which an object rotates. For example, a see-saw's pivot is at the centre - the part which is 'fixed'.

In DB, objects can rotate around all three axis (X/Y/Z) and the centre of rotation is quite often at the centre of the object.

But, when an object is loaded, it's X, Y and Z angles of rotation may all be set to 0 (zero), but the object may not be pointing in the direction you want.

So, you rotate the object manually with the Rotate Object commands so that it is pointing in the direction you need it and then use Fix Object Pivot ObjNum.

This resets the object's angles all to 0 (zero), but keeps the object pointing in the direction you set it.

TDK

Login to post a reply

Server time is: 2024-11-23 20:10:18
Your offset time is: 2024-11-23 20:10:18