JV-ODE Physics Thread 11

Blitz3D Forums/Blitz3D Userlibs/JV-ODE Physics Thread 11

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks VIP3R (;-), managed to create two meshes at this post:-

http://www.blitzbasic.com/Community/posts.php?topic=81131#914022

Now just gotta correlate it to somehow blending in two pngs.... I'm considering trying to see my car bodies in wireframe to help me apprecaite if there is the necessary meshes created along the lines of the following code:

ode\geom=dCreateBox(Space,3,1,4) ; I think this line intelligently makes all the quads to make a cube, whereas the assistance I'm receiving is along the lines of building a 'entity' from the most basic commands:-

Graphics3D 800, 600, 0, 2
SetBuffer BackBuffer()

;create new mesh(s)
mesh = CreateMesh()
mesh2 = CreateMesh()
;create surface(s)
surf = CreateSurface(mesh)
surf2 = CreateSurface(mesh2)

;create 4 vertices
v0 = AddVertex(surf,  1,  1, 0, 1.0, 1.0)
v1 = AddVertex(surf,  1, -1, 0, 1.0, 0.0)
v2 = AddVertex(surf, -1, -1, 0, 0.0, 0.0)
v3 = AddVertex(surf, -1,  1, 0, 0.0, 1.0)
;create another 4 vertices
v4 = AddVertex(surf2,  3,  1, 0, 1.0, 1.0)
v5 = AddVertex(surf2,  3, -1, 0, 1.0, 0.0)
v6 = AddVertex(surf2, 1, -1, 0, 0.0, 0.0)
v7 = AddVertex(surf2, 1,  1, 0, 0.0, 1.0)

;create 2 triangles
AddTriangle surf, v0, v1, v2
AddTriangle surf, v2, v3, v0
;create 2 more triangles
AddTriangle surf2, v4, v5, v6
AddTriangle surf2, v6, v7, v4

;create camera
cam = CreateCamera()
MoveEntity cam, 0, 0, -5

;main loop
Repeat

	;w = wireframe
	WireFrame KeyDown(17)
	RenderWorld
	
	Text 0, 0, "w = wireframe"
	Flip

;esc = exit	
Until KeyHit(1)

End



Somehow I need to maybe extract the information from createbox to pick out the individual sides of the entity.... I'm not sure how yet.