How do I Rotate an object based on touch position,(turntable

0 favourites
  • 4 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • I would like to do something like a Turntable, where based on the touch position, you can spin forward backward the object. I don't think sound could be done like this as well could it? something like "DJ scratches"?

  • On touch set initx, inity variables to touch xy, set isintouch variable to 1

    variable isintouch=1, set mydist variable to distance(initx,inity,touch.x,touch.y)

    ->initx>touch.x, do foo

    ->initx<touch.y, do pitydafoo

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you please explain this code neatly .I'm not able to understand it properly beacuse im new to construct 2.

    On touch set initx, inity variables to touch xy, set isintouch variable to 1

    variable isintouch=1, set mydist variable to distance(initx,inity,touch.x,touch.y)

    ->initx>touch.x, do foo

    ->initx<touch.y, do pitydafoo

    I want to rotate the wheels by touch .If i move my finger clockwise then wheels should rotate clockwise and if i move my finger anticlockwise then it should move anticlockwise direction.

    Can you please put .capx file or put code of rotation of wheels by touch gesture .

  • I got the solution. We can do it by the event -> wheel , followed by the action -----> set angle towards(Touch.X,Touch.Y)

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