Child Entity Rotation from Parent


👉 BlitzCoder will be building a new platform and other plans to preserve and continue the Blitz legacy.

To be able to achieve this goal, we need your support by becoming a Patreon Paid Member 👈

 

Tweet blitz3d entity-system code-archives miscellaneous tutorials
BlitzCoder

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