Solved

collision detection

Posted on 2000-04-19
6
391 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

12 Experts available now in Live!

Get 1:1 Help Now