Alright, with little progress the last time I tried to conquar this problem I've
decided to make a freash start and a freash explination.
I'm working on 3D collision detection. The surfaces are multi-point 2D pollygons to compose 3D objects.
I'll do Tree and Node's later, right now it's the basic problem of collision that's
getting to me.
I've been studying this:
http://astronomy.swin.edu.au/~pbourk...try/planeline/
but i've had little luck in getting a sucessful version of code.
My target is to give Start_Point, Destination_Point to a function and
retreive the Collision_Point.
Here is my data structure:
I need this explained to me like i'm a 2 year old because i'm so througly frustrated with it.VB Code:
Player(MyPlayer).Location as D3DVECTOR 'where my specific player is on the map with X,Y, Z Player(MyPlayer).Direction as D3DVECTOR 'the direction my player is facing with yaw, pitch, and roll (yes, its a person not a craft) Faces() as OBJECT3D 'contains all pollygons on the map. Type OBJECT3D Texture As Long ' DirectDrawSurface7 says "this face has texture of(alltextures(texture))" vFace() As D3DVERTEX 'Open ended array of vertices minXEdge As Long 'if you draw a 3D cube/rectangle around the surface then minYEdge As Long 'the X,Y,and Zs provided here are the boundery points minZEdge As Long 'of that box. These will aid me later with how i plan maxXEdge As Long 'to build nodes and trees. maxYEdge As Long maxZEdge As Long IsVisible As Boolean IsSolid As Boolean End Type 'Faces(1).vface(1) is Polygon #1 Vertex #1 Function Rotated(Location as D3DVector, Direction As D3DVector, Distance as Single) as D3DVector 'the Rotated function will return a the location of the object at "Location" 'facing "Direction" and traveling a distance of "Distance" along said direction 'as though there are no impacts. 'this is how i've been getting the intended end-point of travel.
Demo and screenshots can be found at http://www.vbforums.com/showthread.php?p=2056330


Reply With Quote