Z order

Blitz3D Forums/Blitz3D Programming/Z order

D4NM4N(Posted 2004) [#1]
I need to know why the entityorder function does not work. Im setting an animmesh'child entitys to a value of -1 and my 3d dashboard still disappears into walls. Anyone know???


eBusiness(Posted 2004) [#2]
I don't understand what you are doing, what is set to what, and what disapear?


D4NM4N(Posted 2004) [#3]
i have a 3d dashboard which stays in front of the camera. with entityorder it is supposed to be drawn in front of everything but isnt. when it gets close to a wall it sinks into it. but if its supposed to be drawn in front it should not disappear. Its 3PS so increasing entityradius to protect it wont work.


Perturbatio(Posted 2004) [#4]
maybe posting some example code will help people solve your issue.
from what I have seen, the entityorder command works just fine.


jhocking(Posted 2004) [#5]
EntityOrder always works fine for me, so I'm guessing you simply did something wrong in code. Probably you think you are setting the dashboard to -1 but in fact, due to some little nitpick in your code, you are not.


D4NM4N(Posted 2004) [#6]
speedo=LoadAnimMesh ("jet_data\dash\dash.x",c\camera):
ScaleEntity speedo,.4,.4,.4
EntityFX speedo,1:
If speedo Then
ends=CountChildren(speedo)
For d=1 To ends
chi=GetChild (speedo,d)
EntityOrder chi,-1
Next
MoveEntity speedo,-1.4,-1.0,2
RotateEntity speedo,EntityPitch(c\camera)+26,EntityYaw(c\camera)+180,EntityRoll(c\camera)
EndIf


DJWoodgate(Posted 2004) [#7]
You are only getting the first level of the hierarchy. Try Masterbeakers function:

http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=796