Need some help with the "platform" behavior and collisions

Get help using Construct 2

Post » Tue Mar 24, 2015 8:36 pm

Hello, I am using the "platform" behavior in the following game:
https://dl.dropboxusercontent.com/u/187 ... index.html

Sorry, but I can't share the .capx file since my engine is almost complete. The [player] has "platform" behavior, the moving blocks have 2 "sine" behaviors (horizontal and vertical), and the brown block is "solid", there is no extra events/code involved.

I've encountered the following issues when the [player] is above a moving platform and collides with a [solid] object.

1) In the layout "case1" when the object [player] stays on the moving [block] and is colliding with the solid [ground] the following happens:
- on collision with the right solid [ground] -> the [player] is moved 1-2 pixels down
- on collision with the left solid [ground] -> the [player] is moved 1-2 pixels up
Image

2) The layout "case2" is similar to "case1", but the [block] is moving on diagonal and is moved (wrong placed) away when colliding with solid [ground]
Image

3) In the layout "case3". How I can make the [player] to move/stay on the platform that is moving up (above the one that the [player] is standing)
Image

What can I do to fix these issues ?
Last edited by TGeorgeMihai on Wed Mar 25, 2015 8:10 pm, edited 1 time in total.
B
48
S
15
G
6
Posts: 518
Reputation: 7,138

Post » Tue Mar 24, 2015 8:44 pm

For me, the player gets put inside the moving platforms.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Wed Mar 25, 2015 8:11 pm

I've added animations in the first post :D
B
48
S
15
G
6
Posts: 518
Reputation: 7,138

Post » Sat Mar 28, 2015 12:41 am

Anybody ?

I was thinking to check the collision at offset and move the player in the opposite direction where the moving [block] is going.

How do I calculate the distance the block (with sine behavior) in moving ?
B
48
S
15
G
6
Posts: 518
Reputation: 7,138

Post » Fri Apr 03, 2015 6:34 pm

I've fixed case 1 and 2 with the following events:
Image
It still hang/hooks a little so if someone knows a better method or what I should modify it would be great :)
B
48
S
15
G
6
Posts: 518
Reputation: 7,138


Post » Sat Apr 04, 2015 5:26 pm

Lordshiva1948 wrote:Learn more with demos:
https://www.dropbox.com/home/Demos

The link doesn't work.
B
48
S
15
G
6
Posts: 518
Reputation: 7,138


Post » Sun Apr 05, 2015 4:38 pm

Lordshiva1948 wrote:TGeorgeMihai check again works fine
https://www.dropbox.com/home/Demos

Image
Works for you because you are logged into your account. Try to open the link in private/incognito tab (or not logged in).
B
48
S
15
G
6
Posts: 518
Reputation: 7,138


Next

Return to How do I....?

Who is online

Users browsing this forum: LeirSchiessl, Solomon and 0 guests