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 / tracking system?

Author
Message
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 25th Jan 2006 01:36
I know this is possible, it has to be, it just takes some math man to figure it out for me... How would you get a object to follow another object? for instance, if I had a plain, and a missle was coming after me, how would i get the missle to come to my plain in the shortest distance possible? Does anyone know?

dont assume cause ull make an ass out of you and me!
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 25th Jan 2006 02:01
Use the Point command to point the missle at the plain:
Point object missle number, plain x, plain y, plain z
and then
Move object missle number, missle speed
You will, of cource, have to substitute the missle number, etc. with the variables that hold the info, or just the number itself.

Quote: "it just takes some math man to figure it out for me..."

Lol, not much math, huh? DB makes it easy


Hippopotomonstrosesquippedaliophobia-Fear of long words
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 25th Jan 2006 03:21
I was looking at a math tracking system, the plain and missle is acully not my game, my game is using 3d models ina 2d world.... kinda wierd..... BUt ill try that.

dont assume cause ull make an ass out of you and me!
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 27th Jan 2006 02:21
ok, thats works great except for one thing, when i stop moving, the following object just goes straight, and doesnt home in on the stationary target, and if i write code to force move me, so that the follower will follow, he doest follow. How do i fix this?

dont assume cause ull make an ass out of you and me!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Jan 2006 17:32
it sounds asthough your code, i.e. from above is in the wrong place... probably in the movement code, wheras you really just want to put in the main do-loop so that it is calculated every loop.

life's one big game
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Jan 2006 22:24
You look like you want the missile to always go for the target, but not always have to point towards it. Try using the Atanful() and Curveangle() commands for this

Login to post a reply

Server time is: 2024-11-27 05:50:00
Your offset time is: 2024-11-27 05:50:00