EntityDistance of Child objects
Blitz3D Forums/Blitz3D Programming/EntityDistance of Child objects
| ||
It seems as if EntityDistance when used on Child objects returns the values for the child's Parent, rather than the child itself, is there any way to set a global flag for this? |
| ||
PLace a temp pivot at the child's world coords and test against that instead? ...alternatively, manually calc the distance in the usual way: dx# = EntityX(mesh,1) - EntityX(child,1) dy# = EntityY(mesh,1) - EntityY(child,1) dz# = EntityZ(mesh,1) - EntityZ(child,1) entity_distance# = Sqr(dx*dx + dy*dy + dz*dz) p.s. If EntityDistance does take the parent's position (as you say), then it should have a 'global' flag to override it, I agree. |
| ||
That's odd.... I did some simple tests and I appear to have been wrong (that's not the odd bit) What is strange, is that that's what seems to be happening in my actual program. I know the objects Dont share the same position as one is the camera.... Oh well, thanks... *drinks more coffee* |