Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Miscellaneous Rotation Variable

DrprofLuigi opened this issue ยท 6 comments

commented

Just a variable that goes from 0 to 1, and is tied to a GUI button. Ideally, there could be a 'miscVariableSpeed' json definition that could define the delay like the 'door' variable.

https://cdn.discordapp.com/attachments/289084393442639872/715750449176903740/2020-05-28_19-12-30.mp4

commented

Y'all get 4 of these that are linked to switches in the panel in V19.0.0. These are usable as vehicle variables just like "brake" would be used. Names are displayed in the panel to label the switches, and used in the JSON for the variable. See the handbook for details.

commented

Sounds perfect. Something else that would be pretty useful is a 'duration' argument for rotatableModelObjects. The door animations taking time is nice, it would work well for other animations. Naturally, it wouldn't have any impact on parts like steering_wheel, engine, or other variables that react to player control input or part position.

			{
				"partName" : "$convertible_2",
				"rotationPoint" : [0, 0.6875, -0.3125],
				"rotationAxis" : [35, 0, 0],
				"rotationVariable" : "door",
				"duration" : 4 //This animation takes 4 seconds to complete a cycle
			}
commented

Ah, yes. This should be tied to some sort of "special" action vehicles do. For planes, it makes the landing gear go up. For dozers, it moves the pusher. For blimps, it lowers the gondola, and for cars, it does whatever. I'd make the text for the button be part of the vehicle JSON. Sound about right?

commented

Duration would be great, but I'd just note that having the variable in ticks instead of seconds would make more sense.
Though for landing gear... a lot of planes, especially larger ones, have back-and-forth gear motions (e.g. the doors open, the gear retracts, and then the doors close again) to prevent the doors from being damaged while taking off, which would require something like #21 to be implemented before they could work. Also I can see them benefiting from multiple special variables, for things like refueling probes, cargo doors that can only be opened from the cockpit (as on most large military haulers), and variable-sweep or folding wings.

commented

If the duration was implemented in conjunction with rotation caps, you could actually have doors open, gear retract, then the doors could close, all with one variable. This is one MAJOR benefit from adding a 'duration' argument.

commented

If the duration was implemented in conjunction with rotation caps, you could actually have doors open, gear retract, then the doors could close, all with one variable. This is one MAJOR benefit from adding a 'duration' argument.

How would you do this? I think I have an idea, but I'm not entirely sure what you're thinking.