Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: diamondgeezer on March 20, 2003, 11:37:58 pm

Title: 3rd person stuff
Post by: diamondgeezer on March 20, 2003, 11:37:58 pm
OK, how's about displaying cockpit gagues and stuff when in third person mode? It's quite cool to whiz about when you can see your cool looking fighter, but it's a bugger to hit owt due to lack of aiming cues and stuff.

Place your bets!
Title: 3rd person stuff
Post by: CP5670 on March 20, 2003, 11:40:02 pm
I don't know, I never really liked that third-person Freelancer type mode for space sims. Still, this particular thing should be very easy to do I suppose...
Title: 3rd person stuff
Post by: LtNarol on March 20, 2003, 11:40:09 pm
I'd settle for crosshairs
Title: Betting ends
Post by: diamondgeezer on March 20, 2003, 11:43:53 pm
Yeah, even just an aimpoint would be nice.
Title: 3rd person stuff
Post by: Black Wolf on March 21, 2003, 02:05:54 am
3rd person view is brilliant for dodging turret fire - you can see it coming, and so dodge it with no trouble at all.
Title: 3rd person stuff
Post by: Petrarch of the VBB on March 21, 2003, 06:38:42 am
Quite. But we could do with a crosshair though.
Title: 3rd person stuff
Post by: Killfrenzy on March 21, 2003, 06:57:38 am
You're meaning like the view in Starlancer, right?
Title: 3rd person stuff
Post by: Solatar on March 21, 2003, 02:37:13 pm
I would mind the view like in Freelancer (I assume Starlancer is the same)
Title: 3rd person stuff
Post by: J.F.K. on March 22, 2003, 02:59:02 am
The Freelancer view is intentionally arcade-ish, I think...
Title: 3rd person stuff
Post by: IceFire on March 22, 2003, 02:40:25 pm
Outside view is sometimes a much refereshing change from the inside view.  It'd be great to have I think.
Title: 3rd person stuff
Post by: LtNarol on March 22, 2003, 04:39:06 pm
ok, idea: what if you found the average centerpoint of all the primary gunbanks and added to that, oh say, 5x the ship's length, then rendered a crosshairs.pof at that location?  You'd get 3d crosshairs (which are always good) and it'd be relatively simple.

Kinda to give you the idea, obviously the function names, object names, and stuff are gonna be way off since I don't know jack about the fs2 code, but ya, it explains what i wrote up there better.

Code: [Select]

void render_crosshairs(const ship_type &PlayerShip)
{

// find average center

int AverageX,AverageY,AverageZ:
int TotalX,TotalY,TotalZ:
TotalX=TotalY=TotalZ=0:

for(int C=0; C{
TotalX+=PlayerShip.Gun[C].X;
TotalY+=PlayerShip.Gun[C].Y;
TotalZ+=PlayerShip.Gun[C].Z;
}

AverageX=TotalX / PlayerShip.NumGunMounts;
AverageY=TotalY / PlayerShip.NumGunMounts;
AverageZ=TotalZ / PlayerShip.NumGunMounts;

// add 5 to the length axis so that the crosshairs are always rendered in front of the ship

AverageZ+= 5 * PlayerShip.Length;

RenderPof(crosshairs.pof,AverageX,AverageY,AverageZ):
}