help with knob or dial control

0 favourites
  • 9 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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.

    <img src="https://www.dropbox.com/s/83hyaxd354tioyi/knob%20help.PNG" border="0">shc lab

  • 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

    capx

  • 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.

  • 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 version

  • 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

    dl-web.dropbox.com/get/knob%20help.PNG

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)