Search the Community
Showing results for tags 'knob'.
-
Anyone know how to make a rotatable knob?
Dream Of Sleeping posted a topic in Coding and Game Design
I want to make a rotatable knob. I want the player to be able to click the knob or just outside the knob and then for the knob image's angle to change. But I don't know how to work out what angle it would be. I know it's the angle between the mouse pointer, then center of the knob and then top of the knob that I want. This won't even make a triangle if the angle is large enough so looking at trig tutorials I can't even find anything appropriate. Once again my lack of maths knowledge has failed me. But just so you know it's not for lack of trying. Whenever I try and learn trig, there is something from algebra I don't understand, so I get an algebra book which contains an example using fractions, so I brush up on fractions but it contains some large multiplication problems, so I have to practice that then before you know it i'm back to practicing my times tables and have learned nothing to help with programming. Although I totally know what 7 * 8 is without using google. If anyone can explain, please use as little math jargon as possible and imagine your are explaining to a 10 year old with learning difficulties, or you'll probably just lose me. If anyone can just supply code that I can pretty much copy and paste and get working can have a permanent advertisement in the game for their website or game of choice.