How do I let a object make a specific path

Get help using Construct 2

Post » Tue May 13, 2014 12:24 pm

Hi all!

I got a question and im not pretty sure how to do it.

I need to make a object go trough a other object in a random specific path.

Ok in text i can never get it clear so here is a picture:

The red dot is object 1. Always at the same location located in the center.

I need the blue object to kinda get warped into it and get back. Just like gravity. The thing is i have no clue how to do this.

The yellow lines are example paths that the blue object can take.

So to make it even a little harder, the blue object has to get a random speed once it passes the red object.

This means that every "warp" will have a different outcome.

You can take this example as the world. Once you go up you will go down but this time there is nothing to stop you.
So as real life example:

You jump up into the air for 1KM height.
You fall down and when you get that 1KM back you wont be splashed to earth but you will get shoot out the other half of the world where you, for example, jump up another 2KM.

I hope i made myself clear. I Really could use some help on this one!

Thanks in advance!

After a while i thought it would be really hard to understand my explanation.

So, try 2.

You can see it as a invisible bungee rope between the blue and the red object, but with more speed.

Once it has fallen down the object has to bungee back up, in any direction as long as it passes the red object.

This has to continue. The room has no bottom and no top, it has to be like a circle with gravity going in a shockwave out.
Posts: 165
Reputation: 2,511

Post » Tue May 13, 2014 3:29 pm

Here are some examples that can get you started.

The "Orbits" is the simplest one (because this is as far my mind can get me :lol: ) and it uses the Physics behavior on the left and a combination of Sine behaviors on the right. The trails are just for fun :)

The other two examples were made by R0J0hound (I don't remember from which topics I took them) and I think that I renamed them. If you can decipher the logic behind his magic, I bealive you can create whatever result you wish. He basically emulates real world gravity between objects!
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
Posts: 1,146
Reputation: 10,379

Return to How do I....?

Who is online

Users browsing this forum: KTML5 and 32 guests