Data Realms Fan Forums
http://45.55.195.193/

AimRange on ACrab
http://45.55.195.193/viewtopic.php?f=1&t=17374
Page 1 of 1

Author:  MaximDude [ Fri Dec 18, 2009 9:23 pm ]
Post subject:  AimRange on ACrab

Ok, so i'm making a ceiling turret and I have some issues with AimRange.

I need my turret's AimRange to be 90 degrees (The value being 0.785) but AimRange Works like this:
Image
Here the gray line is 0 degrees and each red line is 45 (or 45 and 315, what ever suits you best) .

I need my turret to work like this:
Image
With the gray line being 45 degrees and the red ones being 0 and 90.

Is there a way to do this without too much headache?
I know I can just set it to 1.57 for 180 degree AimRange but I don't want my turret to be able to aim up...

Author:  dragonxp [ Sat Dec 19, 2009 1:22 am ]
Post subject:  Re: AimRange on ACrab

didnt darkstorm's drone flying things and the ceiling turret not able to shoot up?
Maybe you should look at it or i will volunteer to look for the variable.

Author:  Grif [ Sat Dec 19, 2009 1:35 am ]
Post subject:  Re: AimRange on ACrab

Not possible without Lua, and even then not perfect, mostly because human control overrides lua settings (I'm pretty sure).

Author:  Geti [ Sat Dec 19, 2009 5:31 am ]
Post subject:  Re: AimRange on ACrab

Nah, you can disable firing when above the angle easily. I think you can adjust AimAngle to change this more easily though.

Author:  MaximDude [ Sat Dec 19, 2009 2:59 pm ]
Post subject:  Re: AimRange on ACrab

Hmmm...
Well, that blows balls.

Would something like 'if angle > 45 then angle = 45' work?

Author:  Grif [ Sat Dec 19, 2009 9:22 pm ]
Post subject:  Re: AimRange on ACrab

well, it's in radians, so you'd be using
actor:GetController():GetAimAngle(false)

the false argument means that hflipped is irrelevant; thus, you're only ever going to have an aimrange from 0 to math.pi.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/