MiniB3D

Blitz3D Forums/Blitz3D Programming/MiniB3D

JBR(Posted 2009) [#1]
Hi, Using miniB3D, (yes it's in the B3D forum - the commands are the same)

What I have is a chessboard. Instead of the chessboard rotating I would like to move the camera around the chessboard.

Chessboard is on the x,y plane with z pointing upwards. And I want to look down onto the x,y plane.
Anyone help? (without using turnentity)




Warner(Posted 2009) [#2]
Why without using TurnEntity ? It offers prob. the most easy solution. Then you can create a Pivot, attach the Camera to it, move the Camera back and then turn the pivot during the loop.
Anyway, my maths are worthless, but I noticed that PointEntity has an optional 'roll' parameter. You could maybe insert (G_Camera_Rot_Z+90) there.
It sort of does the job, but not quite: the movement seems rather typical



Floyd(Posted 2009) [#3]
I prefer the usual convention that Y+ is up.

Import sidesign.minib3d

Graphics3D 1024, 768, 32, 2

chess = CreateCube()
ScaleEntity chess, 1, 0.01, 1

cam = CreateCamera()
PositionEntity cam, 0, 5, -15
camerazoom cam, 8

piv = CreatePivot()
EntityParent cam, piv
PointEntity cam, chess

Repeat

	rotateentity piv, 0, ang, 0
	ang = (ang + 1) Mod 360
	
	RenderWorld
	Flip

Until KeyHit(key_escape)



JBR(Posted 2009) [#4]
Thanks guys. Working Great!
Jim