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 / change object orientation without rotating object?

Author
Message
mususama
15
Years of Service
User Offline
Joined: 7th Jun 2009
Location:
Posted: 24th Mar 2011 13:52
is there anyway tochange object orientation without rotating object?
for example i want to move an object in the direction the camera is facing without rotating the object to face that direction. is this possible?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 24th Mar 2011 15:44 Edited at: 29th Mar 2011 00:30


Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 24th Mar 2011 22:59 Edited at: 24th Mar 2011 23:28
Well, orientation = rotation = facing.

I think what you mean is "change the position of the object without changing the rotation"?

There is a set of commands that makes this really easy.

NEWXVALUE(), NEWYVALUE(), and NEWZVALUE()

This code illustrates using them to move an object in the y direction the camera is pointing, without changing the facing of the object.



As you can see, the object moves, but does not change its rotation/facing. I put in the second camera view so you can see that, even when the camera is not facing the object, the object still moves in the direction the camera is facing.

Now, if you instead want the object to remain in view the whole time, I suggest using the SET CAMERA TO FOLLOW command, or code that does something similar.

mususama
15
Years of Service
User Offline
Joined: 7th Jun 2009
Location:
Posted: 25th Mar 2011 01:21
thanks Rich Dersheimer thats pretty much exactly what i was aiming for..

Login to post a reply

Server time is: 2024-11-22 23:15:16
Your offset time is: 2024-11-22 23:15:16