How to make object go to some position after bounce?

0 favourites
  • 5 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I am spawning N number of balls, which are bounding of the wall and after that I want to go to some position, over other object. There is video of what I exacly want to do.https://gofile.io/?c=djDKwl.

    What have I tried?

    Almost everything that I can imagine, i tried to disable bullet behaviour and use find path to the element coordinate, but no luck, because the balls first stop and then are going slowly to object, and are not exactly in middle but on the side.

    Tried also custom movement behavior, without any luck too...

    I am really gratefull to any help <3

  • what movement type are you using for the balls?

    it's tricky combining movement types.

    one way would be to trigger a random countdown after the bounce, then shut off that movement type and switch to another type. But your angles and force will have to be fine tuned...

    try this...

    drive.google.com/open

  • or instead after collision with the wall calculate your own trajectory/speed to the hole...

  • Thank you, any more suggestions. I don't really know how can I calculate trajectory, when there is only Bullet - set pixels, and pixels travelled.If I calculate the pixels from end of layout to the elements they would be only for X, there was a qerp and lerp functions, I think ... but haven't used them ;(

    Thanks once more !!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check my example, the red ball will work. I did the new trajectory with the ENTER one. The only problem is if it hits the wall in a weird place the angle will look wrong, which is why I said you have to fine tune your angles and speeds. Figure out places on the wall where if hit would look "good" going straight into a hole.

    Also I manually apply a "drag" after it hits the wall - which emulates mass and energy being transferred to the wall (since we don't have actual physics in that one). So you want to make sure the drag is not too "high" if the hole that the ball is going to is too far away.

    I would script set holes for different points on the wall. So each ball will have it's own approach angle/speed and hole destination pre-determined. Then you can randomize between those sets and fire a mass of balls going to their prospective wall points and destination holes.

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