JV-ODE Physics Thread 3

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

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.

I hope that's true Wayne, cause right now I'm feeling stupid, lol. Trying to get my head around the multi space idea, in that I'm trying to load a land mesh then dup it in a grid like pattern. VIP3R mentioned multi spaces would enable the usage of multi meshes and everything I'm trying fails.

The problem I guess is that the examples included do have multi space style code but for basic primatives and not fully loaded meshes, hense I assume I'm stuck using the LoadMesh and TriMesh.

Here's the reasoning behind this. Milkshape, (which is my fav proggy for quick stuff, has a really easy Heightmap terrain generator, and the really nice thing is that the mesh is designed so that you can duplicate the mesh and it lines up on any side exact, hense you can "tile" them with perfect edge matching. Now here's a snipt of the code I thought was to be done for it.

;** Globals First **
Global World              = dWorldCreate()
Global Space              = dHashSpaceCreate(0)
Global LandSpace1         = dHashSpaceCreate(Space)
Global LandSpace2         = dHashSpaceCreate(Space)
Global ContactGroup       = dJointGroupCreate(0)

; ###################################################################
; #    Create the Landscape - Using Create TriMesh                  #
; ###################################################################

Global  Dirt     = LoadTexture("dirt1.bmp")
		LandMesh1 = LoadMesh("TestHill.b3d")
		
	 		PositionEntity LandMesh1,0,0,0
			ScaleMesh      LandMesh1,50,2,50
			EntityTexture  LandMesh1,Dirt
			ScaleTexture   Dirt,.05,.05
			EntityColor    LandMesh1,250,0,0

		trimesh = CreateTriMesh(LandSpace1,landMesh1)
			
			dGeomSetRotation(trimesh,0,0,0)
			dGeomSetPosition(trimesh,0,0.05,0)

		RotateEntity   LandMesh1,0,0,0
		PositionEntity LandMesh1,0,0.05,0

; ###################################################################		
		
		LandMesh2 = LoadMesh("TestHill.b3d")
		
			PositionEntity LandMesh2,0,0,0
			ScaleMesh      LandMesh2,10,10,10
			EntityTexture  LandMesh2,Dirt
			ScaleTexture   Dirt,.05,.05
			EntityColor    LandMesh2,0,250,0

		trimesh = CreateTriMesh(LandSpace2,landMesh2)
			
			dGeomSetRotation(trimesh,0,0,0)
			dGeomSetPosition(trimesh,0,0.05,0)

		RotateEntity   LandMesh2,0,0,0
		PositionEntity LandMesh2,3200,0.05,0


Now I do get the items and I understand that non-collision is still needed to emulate the checking between the to meshes from eachother, but this just seems to kill the running OR, only the first trimesh works for checking and the second, while there is not able to preform the needed collision checking.

So any pointers or guides would really be nice. I did spend the better part of the night reading all the forum postings like VIP3R mentioned and referencing the "Examples" but I truly seem miffed by what's wrong.

Topknot

#EDIT#

Ok breakthru, not sure how it all changes from last night and now but one thing I noticed in the above code was that I didn't have the "Positioning" values matching the actual mesh locations, now went in and poof they are lined up and working for collisions, OHHh one thing VIP3R DID say was to not have them intersecting the PLANE below in that the collision detection would drag and poof spot on, lowered it and now smooth frame rate with no drag and working collisionable meshes that stretch for miles ;)

Now to figure out turning off collisions between the meshs and eachother.