Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

collision detection

Posted on 2000-04-19
6
Medium Priority
?
405 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

810 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