Triangular Motion

0 favourites
  • 13 posts
From the Asset Store
Motion Effects - 30 Examples of Smooth Motions
  • I have been trying to create a series of orbits around moving centers where an object moves in a path relative to a moving object's position. I have a perfectly working circle and square motion from users from this site that work how I want all of the motions in my project to work.

    The examples are attached.

    This time I want a triangle motion that is just as smooth. I've tried path finding and I don't know how to edit JohnnySix's [attachment=0:wifh08tj][/attachment:wifh08tj] example to make a triangle. I'm smart, but I only had a highschool physics class and haven't gone past pre cal so no I don't really understand how to create a triangular motion like these examples. I've spent at least 4 hours on the circle motion, 2-4 hours on the square motion, and definitely 3-4 hours on the triangle motion. I almost made the triangle motion, but my best try won't stay on the triangle's path when I move it. I will keep trying, but please help if you can make a triangle motion that moves like the circle and square example!!!

  • What kind of triangle? Equilateral?

    If that's the case, search no more.

    [attachment=0:yef27loz][/attachment:yef27loz]

  • Nice example brunopalermo !!!

  • This isn't like the capx examples unfortunately. In the examples the motion is in relation to the center object, which moves and as it moves the motion path stays relative to the center.

  • You can make the center dynamic,

  • How? Where's the center in the code?

  • I'm still looking for the answer to this. I couldn't use brunopalermo 's example because his moved without being relative to a center object.

    In my capx examples in the first post you can click and the center object follows as well as the path perfectly around the center following where ever you click.

    Pathfinding does not work for this type of movement.

  • In a equilateral triangle, the radius of a circle passing through all it's vertices is the distance between any vertex and the center, That's the radius variable I added to the ball in my example.

  • Not working perfect, but some "improvement" on bruno's example.

    I hope it gives some clue as to how to make a "dynamic center".

  • Kyatric

    I'm glad it isn't just me. I got kinda close. Thank you for this example.

    brunopalermo

    I hope you have time to make it dynamic. I will work on fusing my close attempt with Kyatric's in the mean time.

    I tried creating a right triangle so I could fuse two right triangles into a equilateral triangle, but that was glitchy.

    I also had a point that the square would follow appear and used Move To command, but then when I moved the center it fell off the path even though it made a triangle standing still.

    When this problem is solved I would love to put the circle, square, and triangle examples that behave the way we are aiming for relative to the center in a tutorial or frequently asked questions!

  • Here's an example based on image points. I have an image of a triangle with an image point at each vertex and a sprite moves between the image points.

    [attachment=1:1lujpygw][/attachment:1lujpygw]

    And a more generalised version that works with any number of sides (2+):

    [attachment=0:1lujpygw][/attachment:1lujpygw]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • THANK YOU SO MUCH! IT WORKS Here it is ramones's triangularOrbit.capx edited to do exactly what I want!!!

    THANKS for the polygon examples as well!! I've been stuck on this for like a week or so! You've added simplicity to the code and ideas for my project thank you so much!

    Now I have the circle, square, and triangle. Side to side is easy just use set position. Thanks everyone. I can now create cooler shapes just by having these basic ones!

    Thanks to all the people who helped with this case! Kyatric and brunopalermo! I hope God blesses you!

  • Where are you guys getting release r176? When I go to the download page, it's still on r173...

    EDIT: nevermind. Beta, duh.

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