What you're trying to do just can't work. The look_at method don't just modify the Z axis of the coordsyst but the whole coordsyst orientation. So does the look_at_x method. I don't know how you want to set your solid orientation but calling a look_at method after an other look_at method is not the proper way.
Perhaps you want to set the absolute orientation of your solid and not only relative rotation from its current orientation, is that it ? You can do that by first using the set_identity method that reset your coordsyst position and rotation and after that rotate or turn methods. Souvarine. Pablo Angulo wrote: > Hello, everybody. I'm a new soya user, and I was surprised because it > was so easy to develop a simple 3D app. I had a kind of respect for the > field, but the soya tutorials made the learning curve almost flat. Up to > this moment, whenever I had a problem, I found that the authors had > already though about it and offered a good solution. The embedded > CoordSyst really make most tasks simple. And there is probably one > 'soya' solution to the problem I have now, but I couldn't find it. > > I understand soya does not use matrices, and there is one thing I > don't know how to do without them. I need to set the full orientation of > an object in 3D space. I can set the position, and I can use the > 'look_at' method to set the z-vector of the CoordSyst to the one I need, > but I also need to set the x-vector, and I found that if I set the > z-vector first with the look_at method and then the x-vector with the > look_at_x method, the second call sends the z-vector to an arbitrary > position. > > In [2]: soya.CoordSyst.look_at_x? > Type: method_descriptor > Base Class: <type 'method_descriptor'> > String Form: <method 'look_at_x' of '_soya.CoordSyst' objects> > Namespace: Interactive > Docstring: > CoordSyst.look_at_x(target) > > Rotate so that this object's positive-X points at target. > > > So what is the soya way to set all the position, the z-vector and the > x-vector (provided, of course, that the two vectors are orthogonal)? > > Thank you very much > Pablo > > _______________________________________________ > Soya-user mailing list > Soya-user@gna.org > https://mail.gna.org/listinfo/soya-user > > _______________________________________________ Soya-user mailing list Soya-user@gna.org https://mail.gna.org/listinfo/soya-user