How do I rotate a block around another block?

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 tried using different image points as the connectors but it wasnt doing what i wanted. I also tried to just destroy the box and spawn a new one every time you click the button but it was also a wash. Simply rotating image also wasnt want i wanted as it rotated both boxes.

    I want to be able to hit a key/button and have one of the boxes move to another side of the original box. But I need them to be able to have their own physics. So if one block hits something and stops and does not stop the block that did not hit.

    here is a link to a you tube video to show what I mean.

    About 10 seconds in you can see him rotate the blocks and you can also see how they can separate upon collision.

    Thanks for any help or pointers. Even if its just an idea for me to go and test/play around with.


  • Image points should've worked. Did you set up 4 extra image points, set them up at ([Width * 1.5], Origin Y), ([Width * -0.5], Origin Y), (Origin X, [Height * 1.5]), and (Origin X, [Height * -0.5])? Then just set the rotating box's origin to the other's Imagepoint 1,2, 3, or 4 every tick, and turn it off if either of the boxes collide with any physics object. I'm assuming the boxes are the same size, by the way.

    Since they're likely the same Sprite object, you'll probably need to use local variables to pick which one rotates around which.

  • Hey thanks. I actually had realized that I had made a mistake when trying out the Image pointsand about 1 day ago got the rotations working. Iam using instance variables and just adding/subtracting so I can rotate both ways.

    Ill try to upload a capx to show where I have gotten to. I believe that many of my events are not best use, but Im just trying to use what I know to solve problems to try and mimic the game I am shooting for.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also thanks for the tip on turning off the blocks attachment on collision. Something so simple yet I hadnt yet thought of it.

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