help with knob or dial control

Get help using Construct 2

Post » Sat Nov 30, 2013 2:34 pm

So i'm using construct to develop some virtual laboratories, presently i'm having issues implementing knob control for a heater in one of my experiment scenes, the issue is during rotation, the knob doesn't seem to fit on the position, so the rotation is not smooth, i guess the issue is with positioning my own knob flat on the knob of the heater i'm using.
an idea of the image is below.
here is the link to the lab compiled on drop box(not sure how people actually host their games of drop box, but i have the while file here)
and the image also.
any help on how to deal with the knob rotation would be appreciated.

shc lab
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sat Nov 30, 2013 9:37 pm

@Dasat post your html game in the "public" folder in DropBox. If you dont find it, search google how to enabble it.

[EDIT]: hope this helps

example
capxCipriux2013-11-30 22:28:40
B
79
S
21
G
23
Posts: 513
Reputation: 18,648

Post » Tue Dec 03, 2013 3:26 pm

@cipriux, thanks for the reply, but I'm still yet to view ur capx file cos I'm still on 151.2, can't get to download 152 yet.
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Wed Dec 04, 2013 3:16 pm

@Dasat   You can install different versions of Construct in different directores without interfering with each other(Just click "NO" if asked to uninstal the old version of it)
Also you can open the .caprox file from the project directory (renaming capx extention to zip and unpack) and modify the tag <saved-with-version> and replace with older version (from 15200 to 15102 --- i think 0 in this context act as a decimal point)
...but maybe you have your reasons .
Try redownloading the capx again as I replaced it with 151.2 versionCipriux2013-12-04 15:17:58
B
79
S
21
G
23
Posts: 513
Reputation: 18,648

Post » Fri Dec 06, 2013 6:56 am

@cipriux, thanks I've been able to download the 152 now and viewed the capx, my major challenge wasn't implemeting a normal knob. But when I try to position the knob where I want it. More like a the seat of a chair in a picture, the circle gets distorted from a perfect circle so u actually seed the circle rotating with ur turning. That's the major challenge. I put up a picture of the heater I want to put the knob on earlie, please help view it. Thanks
Link to image of heater
https://dl-web.dropbox.com/get/knob%20help.PNG?w=AAB2EFy2DRFF6A9pHTk_Kn-I8BFcydwyZklsaDTRZe_DsADasat2013-12-06 06:58:57
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Fri Dec 06, 2013 7:03 am

[QUOTE=Dasat] @cipriux, thanks I've been able to download the 152 now and viewed the capx, my major challenge wasn't implemeting a normal knob. But when I try to position the knob where I want it. More like a the seat of a chair in a picture, the circle gets distorted from a perfect circle so u actually seed the circle rotating with ur turning and then the distribution also behaves a bit wierd. That's the major challenge. I put up a picture of the heater I want to put the knob on earlie, please help view it. Thanks
Link to image of heater
https://dl-web.dropbox.com/get/knob%20help.PNG?w=AAB2EFy2DRFF6A9pHTk_Kn-I8BFcydwyZklsaDTRZe_DsA[/QUOTE]
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Fri Dec 06, 2013 8:09 am

The issue here is using a 2D game engine to create a 3D effect.

Perspective transform isn't easy to fake. especially when it's 3 point perspective like in your picture. Easiest way would probably be to fake it with animation. so if angle is 1 - set image to 1. but this would take many images. Maybe instead of using a round sprite you could try with just the stripe that shows the angle and set it's length depending on angle to keep it within the boundries of your knov-picture.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Dec 06, 2013 3:56 pm

@Littlestain, thanks a lot, that lenght idea would be cool but I still have to bother on how to keep it pivot at the centre, but would try and figure out the rest and d necesaary maths for the angle n lenght. Thanks.
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sat Dec 07, 2013 12:18 am

@Dasat
Every circle becomes an ellipse (with an extra distortion in 2 and 3 point perspective)
you could find the distortion using Ellipse polar coordinates, but is complicated unless you are good at math.
Make the knob line having a with = radius intersecting a point in a eclipse function of angle here
Cipriux2013-12-07 00:23:06
B
79
S
21
G
23
Posts: 513
Reputation: 18,648


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, David181 and 13 guests