question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LeftHandDrive returns Right hand drive

See original GitHub issue

Currently Left hand drive is implemented like this:

        public bool LeftHandDrive =>
            Singleton<SimulationManager>.instance.m_metaData.m_invertTraffic
            == SimulationMetaData.MetaBool.True;

I suppose who ever wrote this confused left hand drive with left hand traffic.

I suggest the following fix.

        //make this [Obsolete]
        public bool LeftHandDrive => LeftHandTraffic; // Intentionally wrong for legacy reasons.

        public bool LeftHandTraffic =>
            Singleton<SimulationManager>.instance.m_metaData.m_invertTraffic
            == SimulationMetaData.MetaBool.True;

I didn’t remove Left hand drive because I don’t want to make too many changes in the code. note that the variable names may also need an update.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
originalfoocommented, Nov 29, 2019

I think it will be worth doing, to avoid future confusion. We (well, kvakvs specifically) did a lot of similar code clean up shortly after migration to Harmony framework just to improve overall maintainability of the codebase.

0reactions
kianzarrincommented, Nov 29, 2019

@aubergine10 that would be nice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Left- and right-hand traffic
In LHT, traffic keeps left and cars usually have the steering wheel on the right (RHD – right hand drive) and roundabouts circulate...
Read more >
Is it easy to drive a right hand drive car after driving a left ...
Although my experience driving on the wrong side (left lane) of the road is limited, I did have a Land Rover 88 RHD...
Read more >
Left-hand Drive Vs Right-hand Drive Cars -
The differences between left-hand drive vs right-hand drive are almost none. It is just a question of the driver getting used to each...
Read more >
Is it easy to switch from left hand drive car to a right ...
I switch between RHD and LHD several times a week (driving in LHD country) . The pedal arrangement is the same. The stalks...
Read more >
Left Hand Drive vs Right Hand Drive: The Reasons behind ...
Left hand drive vs right hand drive is a dilemma that many people cannot wrap their head around. Let's get a bit of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found