----- Original Message -----From: ArayaSent: Tuesday, November 06, 2001 9:56 AMSubject: Re: [Virtools] Flipping axis.Hi there,I don't think the "Look At" + "Keep At Constant Distance" will work, as the "Look At" building block has a flipping effect at the poles.To avoid such an effect, you need to provide an additionnal information about the "up" direction you suppose for your world.The "Look At" bb is an easy to use bb and it solve most of the cases, as in most cases we only want to provide a looking direction implying the natural "up" direction to be the Y world axis [0,1,0].The solution is to specify a custom "up" direction, which impede the flipping effect. But this direction isn't absolute. Let say we choose the world X axis [1,0,0]. Then the flipping effect will appear along the X poles.- So the first solution I found is to given the orientation an "up" direction to be the Y axis of the 3d frame it self. That way the flipping effect would only appear if the 3d frame rotate about more than 90 degrees (which should append in a constant motion).To do so use the "Set Orientation" building bock. "up" pIn would be the Y axis of the "targetEntity" frame (get it with the "Get Up" paramOp).As saw that you wanted your orientation to look toward the Y axis. In this case set "local up" pIn to be [0,1,0].- Another solution is to set the rotation in polar coordinates, or simply increment the rotation as I did in the attached .cmo.Hope this help.Araya----- Original Message -----From: tomas salaSent: Monday, November 05, 2001 10:45 PMSubject: Re: [Virtools] Flipping axis.if you don't want the flipping, as I understand from your question..Try using a lookat BB to target the object towards te center frame, a keep at constant distance BB , to keep it in a spere..and use a translate to translate the object over its axis . since it is rotating the translation wil rotate as well. keeping it moving in a sphere,The keep at constant distance BB is to adjust for any possible inaccuracy's (i don't think its neccesary with the lookat at 100 percent)and i think then it will nicely flip over the poles since it's just a local translate and not a rotation.. not quite sure.. but that's my penny...otherwise its back to making exceptions and using math..hope this helps.Tomas Sala
tomas@littlechicken.nl
www.littlechicken.nl----- Original Message -----From: Kam MemarziaSent: Monday, November 05, 2001 5:46 PMSubject: [Virtools] Flipping axis.Hi,
I've been hitting my head against this seemingly simple puzzle for some time & I wonder if there is a genius out there who can resolve it.
In the attached .cmo you'll find two 3dFrames (who at the moment are looking at each other.)
The effect I am after is that of a moving entity whose local oreintation is set such that its `Direction` is always pointing down towards the centre of the sphere.
The puzzle is how to resolve this direction without the Flipping effect at the poles.
So far I can not get past : "As the entity moves over each pole the other two axis flipp around".
See attached.
Thanks for your help.
Kam Memarzia