Physics Jump Start help

Discussion and feedback on Construct 2

Post » Fri Mar 06, 2015 5:52 pm

I am playing a bit around with physics and have a problem, that when i turn physics on (with a trigger
on overlapping) the crate "jumps" on the first collision, after that everything works normal.
Please somebody look the capx if you can give some advice on how to avoid this behaviour.

Thanks.
You do not have the required permissions to view the files attached to this post.
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Fri Mar 06, 2015 6:06 pm

Not had a look yet, but remember it has been stated from day one that physics does not work well with the other behaviors for quite obvious reasons, and may cause unusual symptoms like teleporting.

Is that what you are seeing?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
124
S
29
G
70
Posts: 4,977
Reputation: 49,691

Post » Fri Mar 06, 2015 6:22 pm

Because this the physics of the player is normally disabled, only then, when the player sprite overlaps the crate it turns physics on. The problem is, that on the first contact, the crate makes a jump. After this, everythings works normal.
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Fri Mar 06, 2015 6:32 pm

I do not have C2 right now, but my guess would be that there is a "more than just contact" between the player and the crate (like, since the physic is off, the player can go inside it a little, then physics is on, and the abberation of the player being inside the crate makes the crate react in an unusual way to repulse it).

my guess would be that you would need to get the player at the border of the crate before enabling physics.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,426

Post » Fri Mar 06, 2015 8:23 pm

I have one other sprite as "detector" a bit in front of my player sprite, that overlaps the crate & triggers to turn the physics for the player on, so the player stays always outside of the crate border...
B
11
S
2
Posts: 213
Reputation: 1,266

Post » Sat Mar 07, 2015 5:45 pm

Ok, since nobody came up with a solution, i helped myself with this: i just kicked the physics behaviour out. :)
Because i only need the player to push the crates, i don't really need physics at all, i made a solution where
i just gave the platform behaviour to the crates & it works perfect for my needs now.
B
11
S
2
Posts: 213
Reputation: 1,266


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest