Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
collision...
#1
hello, does anyone know a good way to do collision....

this is what im trying to do...

say you have a quad drawn as the floor...now all the points dont fall on the same plane meaning it ramps...how would i calculate the height that the camera must stay in order to follow the ramp??
Reply
#2
This is not collision.

You want the camera to follow the ground.

The simplest solution is to calculate the distance between the camera center and the bottom-most plane and change it constantly so the difference stays constant.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
Actually, collision here would do just as fine.

One way to do this is to make your object enclosed on a sphere. This is what Doc Dav's engine does. Or even points would do fine.

What you do is this:

1. Search google for "kasper fauerby collision detection"
2. Read the doc at least 3x
3. If you're ready do this:
4. Classify each object whether they reside infront, on, or behind the plane(triangle) by using the standard plane equations: ax + by + cz + d = 0
5. Get the distance (d in the plane equation)
6. if it intesects then collide = true so retain xyz values
7. Do an edge-sphere collision to be sure
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)