VehicleSnap

by Zaflis

Smoothly snaps movement angle when driving cars or tanks.

Content
20 days ago
0.13 - 2.0
240K
Transportation

b Vehicle Snap Not Working with Remote Drive

4 days ago
(updated 4 days ago)

a new feature added in 2.0 is the ability to drive (certain) vehicles remotely. this includes trains, which are already aligned to their tracks, but also tanks. this lets you do things such as attacking biter nests on nauvis while you're off-planet, or ferry your vehicle over to you (would be more useful if you could remote drive cars as they're faster but...) to allow you to move faster.

however, while vehicle snap works just fine when driving normally, driving from the map view doesn't trigger vehicle snap, which means remote driving your tank runs the risk of being slightly off-angle and bulldozing straight through your production facilities instead of driving harmlessly next to them. if you're got pipelines all over the place, driving is already a hazard as it is, and the lack of vehicle snapping makes it worse.

I wasn't sure whether to mark this as a "bug" or a "suggestion for improvement" as you might not have even known this feature was added in 2.0, but since it's not* following expected usage I figured I'd just mark it as a bug for now.

4 days ago
(updated 4 days ago)

I played with this on beta actually and devs added a new event that the mod can use when remote view ends. This slipped through the radar though. The mod listens to probably all events that are related to driving and surface changes to recheck if player is driving.

Having now tested it with debug prints, none of the events trigger when entering the tank from remote view. It does trigger when player leaves it though, and using the Shift-V hotkey or quickbar button resumes snapping.

So i'm going to file a bug report as i suspect on_player_driving_changed_state event is supposed to trigger with "Drive remotely" button.

Only change i could potentially make is check driving state periodically like every 3 seconds for every player in game. It adds minor UPS cost but i'd rather it worked efficiently :p But it is not expensive to check driving state so i've considered it anyway.

4 days ago

ah, yep, turning snapping off and on again fixes it, good to know lol. will be a helpful workaround in the meanwhile

New response