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 / checking if object is pointing to a certain coordinate

Author
Message
Dgamer
21
Years of Service
User Offline
Joined: 30th Sep 2002
Location:
Posted: 29th Jun 2003 05:36 Edited at: 29th Jun 2003 05:37
How can you check if an object is pointing to a certain coordinate? I mean like, yrotate object until it is pointing to the position of an object.

Thanx

The statement below is true
The statement above is false
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 29th Jun 2003 16:34
Create a dummy object, point it at the coordinates and then check if the rotation is the same with OBJECT ANGLE Y(). If it's the same then it's pointing at the co-ords, otherwise it isn't.

"Computers are useless they can only give you answers."
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 29th Jun 2003 18:39 Edited at: 29th Jun 2003 18:39
Here's a code so you can get an idea of what Exeat's talking about. It should work, but I wrote it off the top of my head, so it might not.



"All programmers are playwrites and all computers are lousy actors" -Anon
Click Here!!!
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 30th Jun 2003 14:04
Yeah, that's basically the jist of it although I wouldn't create and delete the object everytime the routine's called (could be every program cycle), I'd just create it when the program initializes or use the Object Exist command within the function like so:



"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-09-20 13:49:01
Your offset time is: 2024-09-20 13:49:01