How to Drag, Drop,AND Rotate an object

  • Hi There:

    Yet another newbie to Construct2 here and as is always the case, I'm looking for help. I need to see some examples of drag, drop AND rotate using touch.

    I've found some examples of drag and drop using the mouse. They are good, but what I'd like to do in my "test" app is to have one object that can be dragged, dropped or rotated by a user when the object is touched. This is similar to what is done in many art programs when transforming a rectangle.

    Would appreciate any kind soul pointing me in the right direction.

    TIA

  • shudapanda.serw5.com

    Play the game and try placing a bamboo.

    Is this something like what you want?

    If it is, I'll send you the file for example!

  • Rory,

    You "ROCK".

    YES!!!! The rotation of the bamboo is exactly what I'm trying to figure out. I'm so new to Construct2. The drag and drop is easy to get since it is already built into Construct2, but rotation has me stumped. I'm working on an idea for an application that needs to have the ability to rotate its objects on an iPad or iphone. I've built applications using jquery mobile, but would like to try to use Construct2 for a more ambitious project.

    Is there and example or tutorial of how you did this.

    Neat game.

    Thanks...

  • I'll PM you my SRC file for learning alright! :)

    Basically just using the drag and drop property, and for rotation, I create this rotation sprite and make it set it's angle to face the position of the Mouse/Touch X & Y. Then I set the Bamboo's rotation to this as well.

  • Great! THANKS Rory. I appreciate the help.

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Wow, cool game Rory

    Like the games features

  • kenli Thank you very much :)

  • kenli Thank you very much :)

    Rory, i think i need a .capx sample too for Drag, Drop, and Rotate Object.

    Hopefully you can PM me ^^

  • I'll PM you my SRC file for learning alright! :)

    Basically just using the drag and drop property, and for rotation, I create this rotation sprite and make it set it's angle to face the position of the Mouse/Touch X & Y. Then I set the Bamboo's rotation to this as well.

    Rory hello, i would like to have your src to learn, i have another interesing example how to change game settings without editing with C2 by myself in return. Thanks!

  • Alright Joannesalfa PMing you in a sec :)

  • Hi Rory,

    I don't want to leave you wondering if I've ever made any headway with your sample code. I am buried under other work right now. That combined with the holidays haven't given me a lot of extra time to devote to Construct2. I have tinkered a little with the code sample . I'm not sure that Construct 2 is making sense to me yet. I'm thinking that it is more complex than I had imagined, but I as I get a little more time, I will see what I can make of it. Your code has helped me a lot to get a handle on approaching the environment as well as helping me with my original problem.

    Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • shudapanda.serw5.com

    Play the game and try placing a bamboo.

    Is this something like what you want?

    If it is, I'll send you the file for example!

    Hey, could I get the source as well?

  • There is a possibly more complex idea here, R0J0hound came up with:

    http://www.scirra.com/forum/resize-handles-example_topic54023.html

  • can anyone send capx from this topic to email? please.

    ur.liamead@0onex

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