Ship turn speed restriction in cockpit view

A place to post suggestions for new features, new bugs, and comments about the existing code.
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

There is a ship turn speed inhibitor for when the ship is in cockpit view. I don't know whether it's at a set margin or if it's something like a percent, but it is a very big pain to figure out the turn speeds for the BSG ships.

Take a look at them - Turn in cockpit view, takes about four or five seconds to do a full circle. Go to F11 view, and it takes half to a third of the time. It makes it hard to balance the ships when their turn speeds are not what they actually say they are
Image
ImageImage
Spinoza
Posts: 799
Joined: Tue Nov 27, 2007 6:25 pm
Location: Israel

Post by Spinoza »

Is this related to using a mouse ? It sounds like a mouse issue.
I use a stick and I haven't noticed a difference between normal turning and turning during the launch sequence.
I often turn around to nan the base ...

Have'nt played much BSG. I'll test it soon.
Image Image Image
HSharp
Posts: 5192
Joined: Fri Aug 11, 2006 11:18 am
Location: Brum, UK

Post by HSharp »

I think it has to do with sensitivity. I mean if you try and aim in F11 view its a bit tricky, not very precise.

F11 is for flying
cockpit view is for shooting.
Image
Image
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

i think turn rate in cockpit is limited by your current zoom level. this limit also applies to when you're in a turret.

the problem is, when you're fully zoomed out, the max turn rate is some hard coded number X

so right now turn rate is:

X * (1 - [current zoom level] )

where [current zoom level] is a number between 0 and 0.9 (or something just less than 1).

the above problem is X is lower than the max ship turn rate, but when you are using the outside view, there is no zoom, so the X value doesn't get used, so you can turn faster.

changing it so that it is

[max ship turn rate] * (1- [current zoom level] )

would fix it

**disclaimer: my description of"how it is now" is just for illustration, i don't actually know how it works right now.
KGJV
Posts: 1474
Joined: Tue Jul 01, 2003 7:00 am
Location: Transilvania

Post by KGJV »

when using cockpit view, the code excerpt for limiting turn rates is:

from wintrek\wintrek.cpp - TrekWindowImpl::DoTrekUpdate(...) - line 7228 and lines 7258-7276

Code: Select all

                    if (m_cm == cmCockpit)
                    {
.......
                                //What is the maximum desired rate of turn for this field of view?
                                //Use the same calculation as for turrets.
                                //Keep in sync with wintrek.cpp's FOV by throttle
                                static const float  c_minRate = RadiansFromDegrees(7.5f);
                                static const float  c_maxRate = RadiansFromDegrees(75.0f);
                                float   maxSlewRate = c_minRate +
                                                      (c_maxRate - c_minRate) * fov / s_fMaxFOV;

                                const IhullTypeIGC* pht = trekClient.GetShip()->GetHullType();
                                {
                                    float               pitch = pht->GetMaxTurnRate(c_axisPitch);
                                    if (pitch > maxSlewRate)
                                        js.controls.jsValues[c_axisPitch] *= maxSlewRate / pitch;
                                }
                                {
                                    float               yaw = pht->GetMaxTurnRate(c_axisYaw);
                                    if (yaw > maxSlewRate)
                                        js.controls.jsValues[c_axisYaw] *= maxSlewRate / yaw;
                                }
......
m_cm = camera mode so this only applies in cockpit view.

fov is current field of view (zoom)
s_fMaxFOV is hardcoded constant, value = 50 degrees

pitch & yaw are read from the core (GetMaxTurnRate()) but the effectif control values (jsValues) are reduced down if higher than maxSlewRate which depends only on fov and s_fMaxFOV. (if pitch > maxSlewRate then maxSlewRate / pitch is < 1 so the jsValues is reduced).

F11 view doesn't that that restriction.
Last edited by KGJV on Mon May 19, 2008 2:48 pm, edited 1 time in total.
Image
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

How difficult would it be to remove? *is not a code jockey*
Image
ImageImage
KGJV
Posts: 1474
Joined: Tue Jul 01, 2003 7:00 am
Location: Transilvania

Post by KGJV »

Andon wrote:QUOTE (Andon @ May 19 2008, 04:45 PM) How difficult would it be to remove? *is not a code jockey*
well we could just comment out the whole block but I dunno what the result would be /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> It could be very difficult then to aim correctly with a fast turning ship...

or eventually guard the block with a global setting (and add en entry for it in the esc menu) so users can toggle this on/off.

Really not my call, ask DB. He might be able to send you a preview build so you can test. Currently I cannot build /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Last edited by KGJV on Mon May 19, 2008 2:54 pm, edited 1 time in total.
Image
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

well, if you can show me how to change the code, I can build it. When I get home, I'll test it

EDIT: A toggle would be nice, as the feature is handy a lot of times but problematic at times as well
Last edited by Andon on Mon May 19, 2008 3:01 pm, edited 1 time in total.
Image
ImageImage
KGJV
Posts: 1474
Joined: Tue Jul 01, 2003 7:00 am
Location: Transilvania

Post by KGJV »

Andon wrote:QUOTE (Andon @ May 19 2008, 04:57 PM) well, if you can show me how to change the code, I can build it. When I get home, I'll test it

EDIT: A toggle would be nice, as the feature is handy a lot of times but problematic at times as well
the change to remove the block is simple: just comment lines 7261 to 7276 (add "//" in front).
Image
Andon
Posts: 5453
Joined: Sun Jun 03, 2007 8:29 pm
Location: Maryland, USA
Contact:

Post by Andon »

wouldn't adding /* in the front and */ in the end work easier?
Image
ImageImage
Post Reply