Roller Coaster Loop not working

Get help using Construct 2

Post » Fri Jun 12, 2015 6:16 pm

Hi guys,
I am trying to make a simulation that allows a user to draw a track, and then drop a sprite on it that naturally follows the path that the ball moves. Like a rollercoaster where the passengers have no seatbelts, I want the ball to leave the track if it goes too fast over a hump, or leave the track if the ball is moving too slowly on an inverted section.

I have made some progress thanks to reading some clever posts by R0j0hound, but I am stuck on making the ball follow a loop.

Any advice you can offer would be greatly appreciated.

Link to file:
https:// dl.dropboxusercontent .com/u/81007120/Rollercoaster.capx
B
3
Posts: 2
Reputation: 185

Post » Fri Jun 12, 2015 7:52 pm

The acceleration when overlapping the wall should only be set if the wall is below the ball, otherwise it should just be down. If the wall's angle is between 90 and 270 the it's facing down. Also setting the velocity of the ball should only be done if the ball's velocity is moving toward the wall (this will provide the jumping).

Also it could help a bit if you correct the position of the ball so it pushes out of the wall.

There probably will be issues when the path crosses over itself. One idea could be to only check walls so far ahead and disable them as you pass or something.

You could probably get a similar effect with the physics behavior, but you'll still have to deal with the issue of the path crossing over itself.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Sat Jun 13, 2015 12:16 am

Thank you so much for the input!

I am still slow when it comes to this stuff, so it will probably take me a few days to trial and error through your advice, but I am super grateful for the tips.

I will be sure to post back here if I achieve success.
B
3
Posts: 2
Reputation: 185


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests