Solved

collision detection

Posted on 2000-04-19
6
393 Views
Last Modified: 2010-04-04
how do i detect collision between helicopter and very large  terrain which contains many mountains in direct3d using delphix.
0
Comment
Question by:f15iaf
6 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 2730685
What did you mean by collision and meshes?
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2730702
It all depends on how complex your objects are and how many dimensions you are dealing with. A simple solution would be to treat everything as a sphere and then check to see if object 1's 'sphere' intersects with objects 2's.

e.g. Assume that object 1 can be encompased by a sphere of radius 5 and that object 2 can be encompassed by a sphere of radius 10. To check if the two have collided, check the distance between the two (from the centre points) and if it's less than the two radii combined then they have collided. Collision := (iDist <= (r1 + r2))
Calculating iDist can be done with simple Pythagorus: iDist := SQRT(SQR(x1 - x2) + SQR(y1 - y2)) This can be extended to 3 dimensions using the 3D version but I can't remember it off the top of my head

Hope that helps

The Neil =:)
0
 
LVL 3

Author Comment

by:f15iaf
ID: 2730706
Edited text of question.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Author Comment

by:f15iaf
ID: 2730740
Edited text of question.
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2730747
That's right, change the question after I give one of my better solutions

The Neil =>(
0
 
LVL 4

Accepted Solution

by:
jeurk earned 15 total points
ID: 2731350
hello,
this is the best thing you will find :
http://users.cybercity.dk/~bbl6194/delphi3dx.htm 
it has a component for delphiX that does exactly what you want...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now