[Tutor] One object looking at another at alll times

Rick Christian rc@mlode.com
Sun, 26 Mar 2000 16:00:18 -0800


I keep getting an error with the following script:


#---------------------------------------------------------------------------
--------------

# This function is called on every time the time ticks changes
def ontimechanged():
  yrot = target.Position[0]           # Variable "yrot" equals Target's x
coordinate,
  view.Direction = (yrot, 0, 0)     # Target is the name of another object

  pass

#---------------------------------------------------------------------------
-------------

What I'm trying to do is make one object look at another at all times, do
you know how I could do this?

NOTE: I am using a version of Python called TsxPython that is meant for a
program I have, called TrueSpace.