How do I create a line path that had in mind obstacles

0 favourites
  • 3 posts
From the Asset Store
A set of board games to make your day joyful. Play, Enjoy, Relax
  • Any idea how to do a proper trace line that have in mind curves,etc...

    One trick maybe launch an invisible ball that spawn the points every time the params change.

    But wonder if there is already any plugin/template that does auto in a better way.

    R0J0hound Any idea?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    For whatever motion you want to trace the future path of you’ll need a way to manually advance the object. Behaviors do that automatically every frame, but don’t give manual control to advance multiple frames.

    Logic overview would be:

    1. Save position and velocity

    2. Loop 100 times

    3. — move object a bit

    4. — handle collisions and bounces.

    5. — plot point

    6. Restore objects pos and vel

    Number 3 is pretty easy with an object affected by gravity.

    Add gravity/60 to Vy

    Set position to x+vx/60, y+vy/60

    Number 4, the collision detection and response is a topic of its own. Usually back up the object out of the wall, figure out the angle of the wall and do a bounce calculation.

    Anyways, that’s what you could do in any Game creation software.

    You may be able to do a hybrid approach with constructs features.

  • Thanks for the info!

    About collisions and bounces, i think in case is too complex i can continue without that.

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