Questions about restrictfirearc

Which race do you like most? What do you like - what you don't like? Discuss it here.
posted on August 7th, 2009, 12:00 am
Does any one know exactly how these work?  Do they work on a 360 degree plain, or a 180,-180 plain.  Can anyone explain how these work to me?  I understand what they do, I just can't figure out what the values mean.  This is mainly for a phaser that can only fire to the right, or one that can only fire left.  I'm trying to better understand the odf weapon code, cus it isn't my strong suit.  Can anybody help?
posted on August 7th, 2009, 2:14 am
Last edited by Megadroid on August 7th, 2009, 2:19 am, edited 1 time in total.
I'm not an expert on weapons odf, but looking at it, the firearc value probably ranges from 0 to pi (3.14159...) radians, with pi being all the way round ( pi on left, pi on right = 2pi = circle ). restrictfirearc = 1 just turns on the restriction.

So if you wanted your weapon to only fire to the right, you would most likely have to have it mounted facing right (can you do that? I dont know), and give it a firearc of pi/2 (about 1.57). For the left you would keep the firearc the same, and just mount it in a different direction.

Edit - the required arc might actually just be pi, not pi/2. Brain not work, 3am.
posted on August 7th, 2009, 11:00 am
yep, i can only second that. the firearc is not messured in degree as some sources tell, but in radians. Firearcs used in Fleet Operations are bit more then 180 degree to avoid some glitches.
posted on August 7th, 2009, 9:34 pm
I understand that.  I was recentally writing code for a robot that uses a compas chip.  The info it collected, and later acted on was verry tempermental near 360,0, and 180.

You wouldn't believe how hard it was the get the dumb thing to just move north. :whistling:  Or south for that matter.

That is where the -180 plain comes from, if at 180, it starts to count negatively, it saves a lot of trouble, but it is just easier to over shoot as you mentioned.
Reply

Who is online

Users browsing this forum: No registered users and 17 guests