Board index FlightGear Development Aircraft

Turning a knob

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Turning a knob

Postby jam007 » Tue May 02, 2017 8:28 pm

I want to update an altitude settings animation to an knob/slider animation from a complicated pick with different mouse buttons.
You can increase and decrease the settings either coarse or fine. The original has two invisible objects one for increase and one for decrease.
How do I do?
Can I use <visible>false</visible> in knob/slider?
None of the wiki-examples covers this as far as I can see.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Turning a knob

Postby Octal450 » Tue May 02, 2017 8:57 pm

Why do you need that? The way knob-slider works, it would be better to use the knob. Otherwise, use pick.
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5583
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: Turning a knob

Postby jam007 » Wed May 03, 2017 10:25 am

it0uchpods wrote in Tue May 02, 2017 8:57 pm:Why do you need that? The way knob-slider works, it would be better to use the knob.

The original has click left side invisible plane to turn counter clockwise and right side for clockwise.
Turning the knob by dragging left or right?
it0uchpods wrote in Tue May 02, 2017 8:57 pm:Otherwise, use pick.
As I understand you should avoid using pick with references to different mouse buttons. This is in the original code.
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Turning a knob

Postby jam007 » Wed May 03, 2017 6:32 pm

Think I found a reasonable solution using mouse drag to adjust the values.
Now I have a new problem.
I have an instrument with two knobs for frequency adjustment. One for coarse adjustments and one for fine. Both adjust the same property. Is it possible in knob animation to detect if an object is the one manipulated and only visually animate that object.
Like this:
Knob A and B adjust the same frequency property
Manipulating A adjust frequency and spins only A
Manipulating B adjust frequency and spins only B
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Turning a knob

Postby D-ECHO » Wed May 03, 2017 7:18 pm

Yes, this is possible, e.g. by using two bindings per knob animation in connection with a seperate second property for each knob.
D-ECHO
 
Posts: 2460
Joined: Sat May 09, 2015 1:31 pm
Pronouns: Bea (she/her)
Version: next

Re: Turning a knob

Postby jam007 » Wed May 03, 2017 7:22 pm

D-ECHO wrote in Wed May 03, 2017 7:18 pm:in connection with a seperate second property for each knob.

That was the part I hoped to avoid :(
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04

Re: Turning a knob

Postby jam007 » Thu May 04, 2017 9:54 am

Made a visual trick to avoid extra properties. The fine adjustment knob turns one revolution for every step of the coarse adjustment knob. So it appears to be stationary. (The slow turning of the coarse when fine adjusting is only noticeable if you look for it.)
jam007
 
Posts: 579
Joined: Sun Dec 16, 2012 11:04 am
Location: Uppsala, Sweden
Callsign: LOOP
Version: 2020.4.0
OS: Ubuntu 22.04


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 14 guests