I created a turtle in NetLogo which is moving randomly and there are some obstacles. Is it possible to get its current direction? I want to get the turtle to walk back to the center when it sees an obstacle. I can calculate distance to the center, but since I don’t know its direction I can’t say forward or backwards, for example.
Share
The
facexyprimitive will allow you to set your turtle’s heading toward the origin:http://ccl.northwestern.edu/netlogo/docs/dictionary.html#facexy