Child Entity Rotation from Parent
Attention! 👉Starting November 2024, BlitzCoder.org will now be BlitzBasic.org.
Tweet blitz3d entity-system code-archives miscellaneous tutorials
and possibly also movement. This also applies to static and rotating parent entity. space key to rotate child.
; CreateCube Example
; ------------------
Graphics3D 640,480,0,2
SetBuffer BackBuffer()
camera=CreateCamera()
light=CreateLight()
RotateEntity light,90,0,0
; Create cube
room=CreateCube()
EntityColor room,0,128,0
ScaleEntity room,2,.1,2
PointEntity camera,room
door=CreateCone(3,room)
;door=CreateCube()
PositionMesh door,0,1,0
EntityColor door,255,0,0
EntityParent door,room
PositionEntity room,0,-1,5
While Not KeyDown( 1 )
TurnEntity door,0,KeyDown(57),0
TurnEntity room,0,-.05,0 ; comment this out for static parent
RenderWorld
Flip
Wend
End
Reply To Topic (minimum 10 characters)
Please log in to reply