Movement Pegs

Blitz3D Forums/Blitz3D Programming/Movement Pegs

Allright, fine, I'll do it myself!

Haven't got all the clicking stuff yet, but yah.
Graphics3D 800,600,False,2
SetBuffer BackBuffer()

cam = CreateCamera()
PositionEntity cam,0,0,-10

;movement pegs
Base = CreatePivot()
X = CreatePivot(Base)
PositionEntity X,2,0,0
Y = CreatePivot(Base)
PositionEntity Y,0,2,0
Z = CreatePivot(Base)
PositionEntity Z,1,1,2

TurnEntity Base,0,45,0

While Not KeyDown(1)
	entityproject(cam,base)
	BaseX = ProjectedX()
	BaseY = ProjectedY()

	entityproject(cam,X)
	Color 255,0,0
	Line BaseX,BaseY,ProjectedX(),ProjectedY()
	entityproject(cam,Y)
	Color 0,255,0
	Line BaseX,BaseY,ProjectedX(),ProjectedY()
	entityproject(cam,Z)
	Color 0,0,255
	Line BaseX,BaseY,ProjectedX(),ProjectedY()
	TurnEntity base,0,1,0
	
	Flip
	Cls
Wend
End

Function EntityProject(camera,entity)
	CameraProject camera,EntityX(entity),EntityY(entity),EntityZ(entity)
End Function


Now, I need help.
For some reason, the pivots aren't parenting to each other, and so I can't rotate the base and have the other X, Y, and Z points follow it (unless I use math). Does anyone have any idea why this is and how I can help it?