center pivots to objects

Blitz3D Forums/Blitz3D Programming/center pivots to objects

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.

Ah, I see. Well, sometimes Basic is easier than English I guess. Anyway, I have used fitmesh on all types of meshes when I was testing my editor, and I discovered that if you try to fitmesh a mesh quad, it will dissapear:
Graphics3D 800, 600, 0, 2
SetBuffer BackBuffer()

camera = CreateCamera()
MoveEntity camera, 0, 0, -15

plane = CreateMesh()
surf = CreateSurface(plane)

AddVertex surf, -1, -1, 0
AddVertex surf,  1, -1, 0
AddVertex surf,  1,  1, 0
AddVertex surf, -1,  1, 0

AddTriangle surf, 0, 1, 2
AddTriangle surf, 0, 2, 3

FlipMesh plane

RenderWorld
Text 0, 0, "before fitmesh"
Text 0, 20, "press any key"
WaitKey()

FitMesh plane, -1, -1, -1, 2, 2, 2, 1

RenderWorld
Text 0, 0, "after fitmesh"
Flip

WaitKey()


End