so i've hacked together a little velocity indicator that doesn't harm believability like flying star trash would.
instead i got inspired by M.I.S.C. (Military Interface for Space Combat) which uses a pretty huge three-dimensional grid that the hud draws for you (i suppose) which works really great - finally you'll see whether you're drifting sideways, backwards or are actually flying forwards.
the code is - except for testing and fine-tuning parameters and effects of SPEC - pretty much done, but i have no clue where it belongs.
basically i'll need a place where i get access to the current position and - for SPEC stuff - data about the distortion of space (dunno if i need to calculate this myself by analysing the ships velocity or something.)
if someone tells me where to put it i'll fine-tune it, add support for spec and high velocities and then submit a patch to this forums or wherever you guys like it.
thanks.
my very own velocity indicator! :) - what class to put it in
-
- Star Pilot
- Posts: 4
- Joined: Thu Jan 01, 1970 1:00 am
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
Welcome timonator not sure where you would place you code if it your code is python it's more than likely it fits data side if C or C++ then it needs to be integrated in to the main engine apart from that i am not sure on of the devs should be by later.
Enjoy the Choice
Enjoy the Choice
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
-
- Star Pilot
- Posts: 4
- Joined: Thu Jan 01, 1970 1:00 am
-
- Star Pilot
- Posts: 4
- Joined: Thu Jan 01, 1970 1:00 am
thanks. i've put my stuff there, but it seems like if i call GetParent()->Position() from the cockpit class i get only (0 0 0) as vector, how come? how can i get the position of the players ship relative to the major star or whatever you guys are using as origin of the coord system?
i know that GetParent gets me the unit of the ship, because if i use GetVelocity instead i get stuff based on how fast i am.
thanks in advance
i know that GetParent gets me the unit of the ship, because if i use GetVelocity instead i get stuff based on how fast i am.
thanks in advance
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
You might want to check that GetParent() is not NULL (which it will be if you are dead), and also look at GetParent()->fullname... for the main menu it will start out as "dumbfire", which could very well have a position of (0,0,0).
AFter loading a game Position() should work, so that's very strange if it doesn't.
AFter loading a game Position() should work, so that's very strange if it doesn't.
-
- Star Pilot
- Posts: 4
- Joined: Thu Jan 01, 1970 1:00 am
i'm not getting anywhere...
the values i get from those calls are always constant even if i fly with afterburner or SPEC:
i don't want the cockpit to keep track of the ships position by itself by having its own position vector and adding the ships velocity vector onto it every time the indicator gets re-drawn!
help
PS: AccessCamera()->GetPosition or AccessCamera->GetPQR and then using P as position doesn't work either
does vegastrike have the position of the players ship in ram at all? >_>
the values i get from those calls are always constant even if i fly with afterburner or SPEC:
Code: Select all
// this function call is inside void GameCockpit::Draw()
Unit *ThePar = GetParent();
// these values get passed to my indicator function as "const QVector ¢er"
ThePar->Position()
ThePar->LocalPosition()
ThePar->UpCoordinateLevel(ThePar->Position())
ThePar->DownCoordinateLevel(ThePar->Position())
// and this is how i find out wether or not the vector changes
std::cout << center.i << " " << center.j << " " << center.k << std::endl;
help
PS: AccessCamera()->GetPosition or AccessCamera->GetPQR and then using P as position doesn't work either
does vegastrike have the position of the players ship in ram at all? >_>