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 / calculating points of intersection

Author
Message
george_d
19
Years of Service
User Offline
Joined: 4th Mar 2005
Location:
Posted: 7th Mar 2006 14:16
I have a maths question - say for example there are two entities A and B travelling at constant speeds. The bearing of entity A is known and the x,y positions of both also. How would I calcuate the bearing of entity B which would cause the entities to intersect?
H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 8th Mar 2006 01:10
Are the speeds of entities A and B known? By constant do you mean they are traveling at the same speed?
george_d
19
Years of Service
User Offline
Joined: 4th Mar 2005
Location:
Posted: 8th Mar 2006 14:28
By constant i mean the speeds dont change but the speeds of the two entities arnt neccesarily the same. I think this can be worked out by converting the two speeds into the sides of a triangle or using vectors but i havnt been able to work out or find a forumla.

The reason i ask this is for turret control in a game. The turret should fire a projectile at some point in front of a target based on the projectiles speed, the speed of the target and its bearing and their relative positions.
H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 10th Mar 2006 01:23
Ok, I get it. This sounds like something you could accomplish w/ vectors. Unfortunately, I'm new to DarkBASIC, and so I don't know much about vectors. Anyone else?

One by one, the penguins take my sanity away.

Login to post a reply

Server time is: 2024-09-24 17:28:42
Your offset time is: 2024-09-24 17:28:42