The online racing simulator
Spinoff : Moving subobjects
1
(46 posts, started )
Spinoff : Moving subobjects
A lot of people would like to use the popup headlights for other purposes. As the patch release is next weekend, I don't have time to do everything that could be done.

But I wondered if it might be possible at least to enable existing light switches to operate moving parts.
E.g. you could use /light rfog/ffog/extra to operate an item if it was set to be connected to that switch.

Keeping it simple at first, that might be, instead of an object type "popup headlight" you would set "rotating object" as the object type then link it to headlights/rfog/ffog/extra.

Now, in my opinion that would already do a lot of what people want, without me having to add extra text commands, user inputs and data sent over multiplayer (in two separate versions of LFS). It's kept simple by using existing switches. So I hope this may be possible in the time available.


But I also wanted to think on a bit further, although this starts to sound too complicated for this week when I already feel under a lot of pressure. The release next weekend is important to me after a very hard work year and I want a fresh start to finish the other version next year, so we can release the new physics, graphics and updated tracks.

Anyway, I couldn't help thinking a bit as I rolled around in bed and had to get up early again and write some things down.

I came up with this.

Types of object:
- rotator [like current headlights, rotates a given amount]
- slider [moves along an axis a given distance]
- spinner [rotates at a given speed]

Rotator and Slider can connect to:
- boolean switches (e.g. light switches)
- axis (e.g. throttle, brake, clutch, steer)

Spinner can connect to:
- boolean switches (e.g. light switches - spins at given speed)
- moving parts (e.g. engine, drive shaft - spins with object or multiple of it)

Well, that's the concept.

Questions remain:

Amounts:

Range of values for "Rotator" amount?
Currently goes from -180 to 180 degrees. Considered enough for popup headlights and probably for most purposes.

Range of values for "Slider" amount?
Given storage limitations, a range of -1000 to 1000 is available. If the resolution is 1mm that would allow movement of 1m. Probably good for many things, but maybe we need an alternative "Large slider" that has resolution of 1cm (allowing movement of up to 10m)

Range of values for "Spinner" amount?
1) When connected to a boolean switch, this would be a set rotation speed (rpm) when connected to a boolean switch. Again, the base value is from -1000 to 1000. Would that be OK if it plainly represented RPM? So you could have a spinning object 1rpm, 2rpm, 3rpm... up to 1000rpm.
2) When connected to a rotating component, it could be a multiple. Usually 1 (e.g. rotate with driveshaft). But maybe 0.5 (e.g. camshafts rotate at half engine speed). Or maybe some things rotate faster than the rotating component? So what sort of range, given again we have -1000 to 1000 but clearly this must be scaled down massively (nothing will rotate at 1000 times the rate of an component it is connected to). Maybe 10 times the speed would do, so it could go from 0.01 up to 10 times the speed of the connected part?

Rotating parts that Spinners could be attached to:

Engine
Drive shaft
Final drive (diff)
Rear (left or right) wheel
Front (left or right) wheel
Steering wheel angle
Steer angle (left or right)

Input axes that Rotator and Sliders could be attached to:

Steering wheel (-1 to 1)
Throttle (0 to 1)
Brake
Clutch
Handbrake
Hi Scawen, tnx for all your hard work. These are very nice ideas, that would give a plethora of new possibilities.

Rotator amount of +-180deg is fine. For a spinner, I'm thinking about some rotary lights for police, ambulance, trucks and so on activated by boolean switch. They have a periodic rotating objects, so would be good to have the option to set a continuous rotation at a certain deg/s or rpm, or a set number of rotations at that speed, to generalize it. Like for example windshield wipers that would do a few sweeps and then stop, untill a boolean is reset.

For sliders, range is +-1000 is also fine, as long as there would be an option to define the size of each step in units of length (mm, cm or m). I think this is better than to limit the range to some fixed length in m or cm.

Hope this helps for future updates.
So that could in theory allow movable wings (active aero) on cars or also planes?
I guess first step is limited to purely optics, but later on it could be quite interesting / complex once physics get involved. Definatly a fun idea for later Smile
Whith this one can start making movable cranes, buldozers, tanks and similair Smile
Quote :Input axes that Rotator and Sliders could be attached to:

Maybe also:
selected gear
For example to animate moving shift lever.
(At least some types. Not sure how to transform "1 to 5" into the two-axis movement of a H-shifter.)

continuous / constant
for example cooling fans that alway spin at same RPM


Is it possible to link moving objects? By attaching them as sub-sub-objects but also by using one as input for the other.
For example an moveable rear wing that on braking moves upwards but also rotates.
That might allow oscillating movement. (Use a rotator as input for a slider to get a circling back&forth motion)
I'm not sure if this already exists, but objects type like hinges and some way to make attachment point or a joint.
Quote from Scawen :Rotating parts that Spinners could be attached to:
Engine
Drive shaft
Final drive (diff)
Rear (left or right) wheel
Front (left or right) wheel
Steering wheel angle
Steer angle (left or right)

Input axes that Rotator and Sliders could be attached to:

Steering wheel (-1 to 1)
Throttle (0 to 1)
Brake
Clutch
Handbrake

These are great ideas, and we can have anticipated good animations. A moving slider is great too, it would be possible to make more complex animations. Just as a movement from point 1 to point 2 and you could make spoilers go up for example. It's good that the headlights gave you these ideas. But the main animation that is missing is gear shifting, but it's probably too hard to do because it involves more complex gearbox mechanics and that can require more than one movement and the driver's hand animation. Probably it will be too difficult to implement, so it's better to to put this on the back burner, so as not to waste your valuable time. But the handbrake also requires a driver animation (are there also new animations for the driver?).

2 suggestions:

1. Add the same animated collision objects (for example you can make them minimal of 6 faces as a cube or 12 triangles (if its to hard to calculate) to open the doors, hood, trunk. etc. They need collision, otherwise it looks bad when other cars or objects pass through the open doors. (At the end, it would be cool if, it would be possible to link them with sub-objects, and that after the impact could break off and have physics that would break off open doors and get a more detailed model of damage.)
Quote from rane_nbg :Whith this one can start making movable cranes, buldozers, tanks and similair Smile

And then those things will really work and interact with the environment.


2. Make chains of movements that after animation 1, animation 2 can be played, etc. (Not so important as a collision, but if it is not difficult to implement it would be cool,) This would make it possible to make complex mechanisms and different machines like excavators, cranes, etc.

Of course I understand that because of the complexity of my suggestions or because of the time it will take to implement it is possible that it will not be implemented, this is just as a suggestion for the future. Now we all understand that the version with graphics and physics is expected by all and is a top priority after this patch.

Thank you for your work and for your new creative ideas!
This was healthier for my bus mode. Previously, the doors always opened when I turned the headlights on and off or when I turned on the flashlight, now I will connect it to the command and make it more comfortable.
This is so amazing! I have a suggestion which is to have a motor reaction torque value which you can connect to a rotator in order to get some engine movement in vehicles where the engine is visible
I am not sure you want to go in this rabbit hole:

But great work as always!
Quote from pärtan :This is so amazing! I have a suggestion which is to have a motor reaction torque value which you can connect to a rotator in order to get some engine movement in vehicles where the engine is visible

Spinner object can be attached to the engine. One can make a propeler and slap it to the 16 cylinder radial engine Smile
-
(Scawen) DELETED by Scawen : I'll reduce his quote
First of all, ty scawen for listening and follow up what the community wants.

Quote :Types of object:
- rotator [like current headlights, rotates a given amount]
- slider [moves along an axis a given distance]
- spinner [rotates at a given speed]

Good ones!

- maybe another type of rotator that just keeps the movement untill toggled off (like Wipers, going back and forth until disabled)
- "for future" Also maybe the spinners could be used to replicate a pivot point for trailer support of some kind but thats in future of course. We don't want to pressure you now.

Quote :Range of values for "Rotator" amount?

I like 360 but in cases of the sub was used for a decorative purpose like for example a small motor for the pop ups it then needs to spin some more so I'd say it's better to have it spin couple of rounds before stooping, maybe keep the angle range but add options from x1 to x10 for times of repeating before stooping.

Quote :Range of values for "Slider" amount?

Centimeters for sure. Always go big so it isn't a requested thing 1 day after puplish.
Also, cranes.

Quote :Range of values for "Spinner" amount?

Perfect setup. I like having control for each one multiplied seperately.

Quote :you could use /light rfog/ffog/extra to operate an item if it was set to be connected to that switch.

yes,but isn't it possible and more convenient if we used the removed l-tbrk l-cbrk l-ttail l-stail as functions and just rename them to something else Uhmm
This way we save the fog and extra mapping.


Looking forward for it, ty.
Hope it is not off-topic, but some of the movable objects could be linked directly to suspension pivots (and tubes), to enable more realistic suspension arms.
thanks for you understood mr scawen

you best <3
Awesome that you are taking the time to consider this. My suggestion is make it able for the upcoming moving subobjects to hook to the ignition.
A good example is those car multimedia displays that fold out of the dashboard when you turn on the car.
(Vice versa - go back to start position/angle when you turn off the car)

Here's a video: https://www.youtube.com/shorts/vzLMlfK5GEM

Thanks for listening to the community. This will be something special
Today I have coded part of the more flexible moving objects system.

You can select object type:
"Rotator : rotates on a specified axis",
"Slider : slides along a specified axis",
"Spinner : spins on a specified axis",

And connect to:
"Lights : low or high beam",
"Ignition : ignition switch",
"Rear fog : rear fog light",
"Front fog : front fog light",
"Left ind : left indicator",
"Right ind : right indicator",
"Extra : extra light",
"Horn : horn button",
"Siren : activate with siren",

I think that's as far as I can go, there isn't time this week to code other options such as connecting with other rotating parts or controller axes. For 0.7E it will only be these these boolean switches, sort of like the headlight, but now you can connect to these 9 things and these 3 different motion types.

I hoped to release it this evening but it's taken so long, and I still have to merge all the changes from the development version into the public version. That might only take a couple of hours but I'll have to do it in the morning. This evening I still have to finish the editor side of it.
seems am not the only one having a hard time to grasp the difference between spin and rotate
maybe you could clarify this

anyway that looks amazing, just dont burn out !
rotate: rotates the exact amount specified and stops there - e.g. popup headlights

spin: continues to rotate at a given speed - e.g. spinning blue light on top of car
My understanding is that the rotator controls the angle (just like the slider controls the position), whereas the spinner controls the speed of rotation, or angular velocity.
WOOOOOO!! Love the added possibilities 👍🏼 Community was already very creative with the original headlight rotation so some extra axis sliders and rotation objects could open a world of realistic modelling possibilities.

Great addition 🤝🏼
By the way, I changed LFS inputs a bit so the light and horn switches / buttons work even if there is no relevant light or horn. In that case, you obviously won't see or hear anything, but still the switch can be connected to one of these moving subobjects.
Quote from Scawen :By the way, I changed LFS inputs a bit so the light and horn switches / buttons work even if there is no relevant light or horn. In that case, you obviously won't see or hear anything, but still the switch can be connected to one of these moving subobjects.

I wonder when the test patch will be released?

By the way, I appreciate your work very much. It is a great success to test these within a week.
Quote from Rubbel_31 :I wonder when the test patch will be released?

Scawen wrote it a couple of posts above - probably tomorrow morning:

Quote from Scawen :I hoped to release it this evening but it's taken so long, and I still have to merge all the changes from the development version into the public version. That might only take a couple of hours but I'll have to do it in the morning. This evening I still have to finish the editor side of it.

Let's make that this afternoon. I still need to:

- make spinners carry on and stop in the default position
- update vehicle editor to allow testing by switches
- merge code into old LFS
- more testing
Quote from Scawen :Let's make that this afternoon. I still need to:

- make spinners carry on and stop in the default position
- update vehicle editor to allow testing by switches
- merge code into old LFS
- more testing

Good luck! We can't wait Omg omg omg
1

Spinoff : Moving subobjects
(46 posts, started )
FGED GREDG RDFGDR GSFDG