golubenco's Recent Forum Activity

  • The path itself can be defined any way you want. The spine suggestion is a valid way to do it. The hard part is dragging the object along a path which is different than having the object move along a path.

    My example with an arc just simply moves the object to the closest point on the path. That works well since the path is mostly in a line. I guess just moving to the closest point would work for a triangle, square or circle as well. The only issue in my mind is you can then move directly across to the other side instead of having to go around the edge. Using the closest point wouldn't work well for more complex paths.

    My incomplete idea for a better general case solution would be to make the path a polyline since it's simple enough to constrain dragging to a line. Then when a corner is hit it decides which line segment to move on based on the direction to the mouse.

    An alternate idea would be to find the closest point and the find the closest distance along the path, and have the object start moving in that direction.

    But perhaps the closest point is good enough. That involves finding the distance to all the corners and all the edges and selecting to closest one. The distance to the lines is the more mathy one.

    The absolute simplest way would be to put invisible walls around the path with sprites, move the the object toward the mouse with the "move at angle" action, and use the custom movement behavior's "push out" action.

    Thank you, i was thinking the same, maybe adding more points to "spine" will make it more accurate .. anyway need to find out how to code that.

  • R0J0hound, thank you, it's a working example, what about other shapes ? If the pipe is a square or triangle ?

  • wow... i wont lie, i didnt understand anything from your message.

    I`ll add new image, maybe i wrongly described what i want to accomplish.. i want to drug the ball along the curved shape of the pipe.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a few diferent ways to implement it, all of which are somewhat complicated.

    Thank you, can you give me a hint of what could be the implementations ?

  • I need to swipe the button from point 1 to point 2 exactly on specific trajectory, like on the pic.

  • Hi guys, i'm new to construct 2, how i can create a directional swiper when you need to click from point 1 and drag to poin 2 and not cross the sprite border ? The other question is how to apply sprite efect to just part of the sprite (where the current mouse position is). Thank you for any help.

golubenco's avatar

golubenco

Member since 28 Dec, 2016

None one is following golubenco yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies