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 / Turning to point at a target

Author
Message
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 14th Feb 2006 02:43
I want to make it so that an object of mine turns and faces a point. This point will change a lot. Right now I have the POINT OBJECT command. but te object just jerks to face the point, Is there any way I can make it so that the object rotates slowly until it's facing the point?


LIGHT FRENZY (almost done!)
Best Noobish game ever.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Feb 2006 09:04
CURVEANGLE() is your friend in this case. It will allow you to move towards the angle in smaller steps. It doesn't matter if the point moves, you simply provide the most up to date coordinates each time.

GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 14th Feb 2006 15:25
I have a somewhat complicated method for achieving this, but it works flawlessly. It takes 4 points around the object and finds the distance from each of those four points to the point in space you want the object to face.


Yes... as I said before it is complicated. But it works. BatVink may have a better meathod though... lol... Anyways, I hope I helped...



The computer isn't an addiction; it's more of a mental and social dependency.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Feb 2006 15:39
My method is simple, but not necessarily better. I have no idea what the performance of these two commands are, it could have too much overhead if you're trying to squeeze every last cycle out of the processor.

Login to post a reply

Server time is: 2024-09-24 15:25:13
Your offset time is: 2024-09-24 15:25:13