[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: help with float issue



this is how i calculate heading:
		#get the angle the agent should move in from the pos
		playerX = 1 - 0
		targetX = pos[0]-self.pos[0]

		playerY = 0 - 0
		targetY = pos[1]-self.pos[1]

		theta = math.atan2(  targetY - playerY , targetX - playerX  )

		self.setHeading( theta )



--
View this message in context: http://pygame-users.25799.n6.nabble.com/help-with-float-issue-tp331p333.html
Sent from the pygame-users mailing list archive at Nabble.com.