Entityx#() etc Doesn't work on Children?

Blitz3D Forums/Blitz3D Programming/Entityx#() etc Doesn't work on Children?

Gabriel(Posted 2004) [#1]
I'd always assumed that child objects had their own pivot and could therefore return their own entityx#(), entityy#() and entityz#() so that I could place cubes at strategic points then replace them with whatever I want in the code.

But they're returning 0,0,0 ( the position of the parent )regardless of whether I use true or false for the global flag.

I suppose I can write some functions to scan through the vertices of the cubes and find the midpoint, but it shouldn't really be necessary.. or should it?


fredborg(Posted 2004) [#2]
How are you positioning the cubes? Not by PositionMesh, right?


Mystik(Posted 2004) [#3]
Are you saving your models from Milkshape. I had this problem, it seems to set all the child coords to 0,0,0

Steve.


Rob Farley(Posted 2004) [#4]
use entityx(entity,true) for children


Gabriel(Posted 2004) [#5]
Fredborg : No, I'm creating my models in 3dsMax and positioning cubes at strategic points I'm going to need in the game. They all return 0,0,0 though.

Mystik : Not Milkshape actually, no. I'm exporting via Ultimate Unwrap. I haven't tried B3d Pipeline because I've always had problems with it. Might be worth another shot though.

Rob : Yep, that's what I'm using. It returns 0,0,0 though.


Koriolis(Posted 2004) [#6]
This is probably simply because the exporter makes the center of all the entities be (0,0,0), and export the vertices with their global values (rather than exporting the local values and setting the center to be the one you see in 3ds).


Ross C(Posted 2004) [#7]
Yeah, sounds like the axis is at 0,0,0. You can check by rotating the child.


Gabriel(Posted 2004) [#8]
Yep, I guess it must be either Max's fault ot Ultimate Unwrap's fault. Well I've written a function to scan through the vertices and return the midpoint, so I'll use that instead.