[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
Solved

collision detection

Posted on 2000-04-19
Medium Priority
404 Views
how do i detect collision between helicopter and very large  terrain which contains many mountains in direct3d using delphix.
0
Question by:f15iaf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 7

Expert Comment

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

LVL 5

Expert Comment

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

ID: 2730706
Edited text of question.
0

LVL 3

Author Comment

ID: 2730740
Edited text of question.
0

LVL 5

Expert Comment

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

The Neil =>(
0

LVL 4

Accepted Solution

jeurk earned 60 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

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll