Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Custom steering animation

Ooferine opened this issue · 4 comments

commented

The current steering is hard coded, but this limits the steering on a single axis, at a single angle.
In the case of planes, the front gear usually rotates along the strut rather than its center, which requires origin offset.
image

In more extreme cases, some gear struts are even tilted. This requires custom rotation axis.
image

The configuration needs to go with the vehicle rather than the part, so maybe add another rotation section if "turnwithsteer" is enabled.
To avoid breaking current packs, is it possible to set it to default if not specified?

This is likely to be a part of the landing gear physics overhaul

commented

This could be accomplished by adding a few variables for wheels that have "turnsWithSteer" = true,

"caster" = 5 //Wheel is angled 5 degrees back off-axis
"xOffset" = 0.5 //wheel is offset 1/2 a block out from the center
"zOffset" = 0.125 //Wheel is set 1/8 block behind the rotation point

A preferable alternative is to have a 'steeringAxis' that would replace 'turnsWithSteer'. Then we can have cars with camber. If a steering axis is not specified, then that wheel doesn't apply steering forces.

You could apply steering forces on wheels by taking the y value from this vector and using that. This would also allow for wheels to have custom turning angles, rather than the set 45 degrees.

For example:

		{
			"pos" : [-1.125, -0.125, -2.96875],
			"types" : ["wheel"],
			"minValue" : 1.1,
			"maxValue" : 1.2,
			"steeringAxis" : [0, 1, 0]
		}
commented

Instead of x and z offset, it would be better if we can just set the origin like other rotatable parts: “steeringPoint”
The main idea is to keep json off the wheel part, making it vehicle specific so you dont need to mess around with objs to get the origin you want

commented

I like the rotatablePart rotation idea. That makes it easy to loop into the existing rotation system, but still not break all the packs that would get hit if I remove turnsWithSteer. Also means if anything changes in the rotatable bit for performance, the wheels will get the same benefit.

commented

Added (partially?) in V 15.9.0.