Data Realms Fan Forums http://forums.datarealms.com/ |
|
SetAimAngle Question - Solved http://forums.datarealms.com/viewtopic.php?f=73&t=17681 |
Page 1 of 1 |
Author: | Dr. Evil [ Thu Jan 28, 2010 4:15 am ] |
Post subject: | SetAimAngle Question - Solved |
Sorry, but I've got a question here. I apologize in advance if it's just a stupid syntax mistake. This script is running on a ahuman. Code: function Create(self) self.XVARIABLE = 0; end function Update(self) self:SetAimAngle(self.XVARIABLE); self.XVARIABLE = self.XVARIABLE + 0.1; end Shouldn't this cause the actor's aim angle to continuously swing in a circle? However, all I get is an actor locked aiming straight up. Any ideas? |
Author: | TheLastBanana [ Thu Jan 28, 2010 4:19 am ] |
Post subject: | Re: SetAimAngle Question |
If the AimAngle is beyond pi / 2, it just rounds off to pi / 2. Here's what your script will need to do: First, check if HFlipped is true. If it isn't, the increase the aim angle. If the aim angle is greater than math.pi / 2, set HFlipped to true. If HFlipped IS set to true, decrease the aim angle. If the aim angle is less than negative math.pi / 2, set HFlipped to false. |
Author: | Dr. Evil [ Thu Jan 28, 2010 5:03 am ] |
Post subject: | Re: SetAimAngle Question |
Thank you so very much. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |