EntityOrder

Blitz3D Forums/Blitz3D Beginners Area/EntityOrder

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.

First you can avoid all of this:
RotateEntity weapon2,EntityPitch(cam),EntityYaw(cam)+5,0,EntityRoll(cam) 
PositionEntity weapon2,EntityX(cam)+Sin(EntityYaw(cam)),EntityY(cam)-1,EntityZ(cam)-Cos(EntityYaw(cam)) 
MoveEntity weapon2,-16,0,0 
MoveEntity weapon2,0,0,24 
by just parenting weapon2 to the camera.


In this part:
If MilliSecs() > ShotTimer + 2000 
arrow_in_air = False 
ShowEntity Arrow 
End If 
You probably meant for ShowEntity to be HideEntity.


Every frame you set the arrow next to the bow:
If arrow_in_air = False 
PositionEntity arrow,EntityX(weapon2),EntityY(weapon2),EntityZ(weapon2) 
RotateEntity arrow,EntityPitch(weapon2),EntityYaw(weapon2),EntityRoll(weapon2) 
End If 


MoveEntity arrow,0,0,arrow_speed
but then you move the arrow 15 units (arrow_speed) ahead. Is this correct? It doesn't appear to be. This might be your problem. Try changing that and rerunning it without the entityorder commands.