positionentity and childentity

Blitz3D Forums/Blitz3D Beginners Area/positionentity and childentity

Ben(t)(Posted 2008) [#1]
is it possible to get the x#,y#,and z# of a child entity of the global scale?


Ben(t)(Posted 2008) [#2]
nevermind, i found the correct code, and now i feel foolish


Ross C(Posted 2008) [#3]
Don't. The local/global optional flags are easily missed if you skim the docs :o)


Ben(t)(Posted 2008) [#4]
now i actually do have a problem,
I have a box parented to a camera which is parented to a pivot point,
now the box fire missiles using the positionentity and rotateentity commands, and it looks fine if i am firing at a pitch of 0 degrees, but if i start to tilt the camera up the missiles begin to angle themselves below the gun, and it gets more severe as i tilt higher


Charrua(Posted 2008) [#5]
hi

as with the position, for the correct angle you have to get the correct orientation (entitypitch, yaw and roll) in the global system, adding the global (true) flag.


Juan


Ben(t)(Posted 2008) [#6]
I did that


Charrua(Posted 2008) [#7]
I suppose you will say that, but I have to ask!

When that thing's happen to me (more often than I want) I start to put Debuglog's reporting me global and local coordinates and orientation's of the parent's and child's, even of those that obviously are correct ( because most of the time, the obviously correct, are wrong)

hope that help

Juan


Ben(t)(Posted 2008) [#8]
very odd, for some reason when i unparent the camera so the gun is parented to the camera only, the shots work fine

is is possible that a parent entity and child entity messes up rotation and position?

I have tried to make elevators before using child entity but when my character tries to move on the elevator it accelerates at an astounding rate


Azaratur(Posted 2008) [#9]
Can you post the code?

Aza