Solved

collision detection

Posted on 2000-04-19
6
397 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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