Data Realms Fan Forums http://45.55.195.193/ |
|
Angles and HFlipped http://45.55.195.193/viewtopic.php?f=73&t=29632 |
Page 1 of 1 |
Author: | Asklar [ Sat Jan 21, 2012 12:07 am ] |
Post subject: | Angles and HFlipped |
Angles are measured in radians, right? So, half a circle would be 3.14 radians. 0 radians would be 3 o'clock, right? Then, if I kept adding 1.57 I'd get 6 o'clock, 9 o'clock and 12 o'clock until I got back to 0 radians or 3 o'clock position. What the ♥♥♥♥ happens with the measuring of the angles when the sprite is HFlipped? |
Author: | Duh102 [ Sat Jan 21, 2012 8:16 am ] |
Post subject: | Re: Angles and HFlipped |
If I remember correctly, HFlipped is a graphical effect only, so the Angle value does not change. It would merely point to the "back" of the sprite instead of the "front". It's been a while since I dealt with this stuff though. Probably better to just experiment. |
Author: | Roast Veg [ Sat Jan 21, 2012 4:02 pm ] |
Post subject: | Re: Angles and HFlipped |
Asklar wrote: So, half a circle would be 3.14 radians. |
Author: | Duh102 [ Sat Jan 21, 2012 4:47 pm ] |
Post subject: | Re: Angles and HFlipped |
Wat, no, a full circle is 2pi, not pi. 6.28ish. |
Author: | Roast Veg [ Sat Jan 21, 2012 4:49 pm ] |
Post subject: | Re: Angles and HFlipped |
Oh. Oops. |
Author: | Asklar [ Sat Jan 21, 2012 5:31 pm ] |
Post subject: | Re: Angles and HFlipped |
Wait a minute. If I have the 0 rad angle and add 1.57 it would be added counter-clockwise, right? I'm having some flashbacks to my geometry class, and I think it was that way. I've been measuring angles wrong. Wait so, if HFlipped does nothing to the angles, I'm having a different problem. I'll try to check stuff out and then I'll post if I keep having the problem. |
Author: | Asklar [ Sat Jan 21, 2012 7:08 pm ] |
Post subject: | Re: Angles and HFlipped |
I'm not sure, I've been doing the coding assuming that the HFlipped thingie didn't do anything to angles and everything works fine. Except the attachables which doesn't HFlip with it's parent, maybe because I'm making them rotate. What's wierd is that even if I make them HFlip when it's parent is HFlipped, they won't HFlip, but everything related to angles still work. |
Author: | Asklar [ Sat Jan 21, 2012 8:30 pm ] |
Post subject: | Re: Angles and HFlipped |
Ok so, to set the angle of a turret, which is an attachable, I use a simple code to restrict it's aiming arc and make it aim changing it's RotAngle using self:GetController().AnalogAim.AbsRadAngle. Now, when I HFlip the entire actor, the attachables won't HFlip, but they do rotate as they should, and the guns fire as they should. But they are not HFlipped. So, I thought on HFlipping it when the actor is HFlipped, but still, it won't HFlip, and I don't get any kind of error. Halp? |
Author: | Roast Veg [ Sun Jan 22, 2012 1:03 pm ] |
Post subject: | Re: Angles and HFlipped |
Have you tried transferring ownership? |
Author: | Asklar [ Sun Jan 22, 2012 7:26 pm ] |
Post subject: | Re: Angles and HFlipped |
What's that? Transferring ownership? I've only read about it in the wiki, but only things like "Ownership is NOT TRANSFERRED". |
Author: | Roast Veg [ Sun Jan 22, 2012 11:01 pm ] |
Post subject: | Re: Angles and HFlipped |
Basically it's when you can't quite access everything about an MO properly from outside a script attached to itself, so you use ToActor/ToAttachable etc. |
Author: | Asklar [ Sun Jan 22, 2012 11:06 pm ] |
Post subject: | Re: Angles and HFlipped |
Aaahhhhh! Let me try that. |
Author: | Asklar [ Sun Jan 22, 2012 11:15 pm ] |
Post subject: | Re: Angles and HFlipped |
Hah, it worked, the sprite is HFlipped. But, it keeps pointing in the opposite direction. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |