Weapons System For Gcombat with Leading and Trajectory

Ok, this is clearly a wire contraption and has been a bit of a mini project for me.

When I started making this, I meant for it 2 be a follow up 2 my old artillery system : http://www.facepunch.com/showthread.php?t=674862

and also a weapons system I could just mount on any tanks, planes, spaceships etc that I’ll build in the future

Alright, Time for stats/info

Has 3 firing modes:

MODE1- Pod: This targets pod controllers, cycling through them using shift, displaying the slected pod using an adv hud target finder also displaying the owner. Then it aims at the pod controller, accounting for the drop in the gcombat projectile due to gravity with a normal shot or a mortar shot. It also gets the velocity of the pod and calculates the flight time of the projectile and leads it accordingly.

MODE2 - Lock: The same as Pod mode, with display and leading etc, but the target (prop,player,vehicle etc) is picked by aiming at it and pushing shift 2 lock it.

MODE3 - Aim: This is just a standard mouse aiming turret but with the projectile drop accounted for.

All 3 modes have my ‘anti-cockpit’ system so it will aim at what you are aiming at with your crosshair even when you have cockpit props etc in the the way (wont just aim at you cockpit/contraption)

oh and will not target the owner’s Pod controllers.
Uses ApplyTorque so no forces are applied to your contraption aslong as ballsocket linedraw is used

I actully jammed it onto my my Ah-1f Attack Helicopter: http://www.facepunch.com/showthread.php?t=769931
Very easy and only took a few minutes. Also added some helicopter specific features; I found that the leading wasn’t very good at high velocity targets (thanks butler) so I added a LeadFactor variable, which is controlled by A and D, which in simple terms makes it lead more, this is manually adjusted. So if a target is ‘out running’ the leading, the gunner just needs 2 increase the lead factor from 1 up to 2.5, untill the rounds start hitting it.

Oh and can be used with any gcombat weapon, just needs the Vi variable changed (velocity of the projectile) and sometimes another varibale witch I modified on my heli once I realised it was missing.

The heli uses Karbines M197, which (correct me if I’m wrong) doesn’t actually use a physical gravity based arc, but with the correct Vi variable it is a very good approximation and will only start to effect it from one end of gm_flatgrass 2008 to the other. (I tweaked the Vi a bit unitl I got it right)

Vids: (shit qualitly soz)

[media]http://www.youtube.com/watch?v=GovrgXw5OqE&feature=channel

those both show locking mode, but is the same for pod.
Vid 1 is a moving target at range (1x1x1 phx block) <-- well the little 1
Vid 2 shows the hud (not clearly) and a mortar show (which misses occasionally due 2 a dodgy time variable - its complicated but requires itterations so it can get a bit off at range)

Pic showing Aim mode in my heli *note this is a bit off as you can see, but I fixed that by tweaking the Vi like I said. shows how much arc it give it:

Pic showing me in development

sorry no more pics but I didn’t take many and I feel they don’t give it justice

Look forward 2 seeing this in my ‘future’ contraptions

C & C much appreciated, but don’t post dumb comments if your knowledge of wire is lacking

ah and no bonus pics for now (I KNOW!) but I’ll start posting my lol early gmod works in later threads

Ah, forgot 2 say, 160 lines of fun

does it have prediction

Meaning?

meaning is your targets next position predicted and fed into the formula

Yeah, just by a simple velocity leading, it obviously can’t acount for anything once the round is fired, like turning, braking etc, but when you use a weapon with a high rate of fire like the M197, it doesn’t matter it’ll hit 60 or more % of the shots on a high speed target, and almost 100 on a low speed one. This is shown by those moving targets in the vid, that is calc’d constantly, so it is always leading when in Pod or Lock

i want flir

this deserves more views

it really is awesome

This is so cool. And every time I’ll fight you with whatever I’ll use, I will never ever have a static speed, and I’ll drive like how you run if you’re chased by an alligator. Butler knows what I mean, he lives in Alligator land.

I can’t believe I missed this. With all the fucking shit threads getting more replies than the good ones, its hard to find good ones. I loved the second vid, I can just imagine how the target would go like “omgomgomgomgomgomgomgomgomg” dead

Looks awesome.

:smiley: thnx friends

Hugz.

Oh, it’s awesome btw.

That is pretty amazing sir…

People always talk about making these sorts of systems; it’s nice to see one that actually functions. Where’d you get the physics info for the projectiles though? Trawling the weapons’ lua files?

There is an entity in the entity tab that comes with gcombat SVN called balistics computer, but i don’t know if he used it, or how to use it

No, I’m not sure if that thing even works, and if it does I have no idea how 2 use it :-p

I just used standard physics forumlas 2 get all I needed