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 7: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: Turning a knob

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

Why do you need that? The way knob-slider works, it would be better to use the knob. Otherwise, use pick.
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Turning a knob

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

it0uchpods wrote in Tue May 02, 2017 7: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 7: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: Turning a knob

Postby jam007 » Wed May 03, 2017 5: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: Turning a knob

Postby D-ECHO » Wed May 03, 2017 6: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.
User avatar
D-ECHO
 
Posts: 1526
Joined: Sat May 09, 2015 12:31 pm

Re: Turning a knob

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

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

That was the part I hoped to avoid :(
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: Turning a knob

Postby jam007 » Thu May 04, 2017 8: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: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04


Return to Aircraft

Who is online

Users browsing this forum: legoboyvdlp and 2 guests