How do I get rid of sliding on platform with physics

Get help using Construct 2

Post » Wed Jul 16, 2014 7:46 pm

Hey there,

I need some help. I posted about this before and it got answered by using the pin behaviour. Let me explain a little more briefly.

I have a physics puzzle game. All objects have the physics behaviour. My moving platforms have the platform behaviour and physics behaviour, But when my object rolls onto the moving platform even though it is still, it slides side to side on the platform(this is without the pin behaviour) . I tried to use the pin behaviour with a time limit on so when the rolling object rolls or falls off(due to physics) then it pins to the platform. But this created a bad bug, if the rolling object rolls fast and then slows down and falls off, it hangs in the air pinning to the platforms position but in mid air instead and not on the platform or unpinning the object.

I tried testing conditions for when the player velocity=0 but it didn't work

Any help? Please, I would really appreciate it :) Thank you :D
B
9
S
1
Posts: 48
Reputation: 675

Post » Wed Jul 16, 2014 7:51 pm

As far as I know, to prevent weird and unexpected effects it's still:
"Never use physics in combination with other behaviours"
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 16, 2014 7:58 pm

Ahhh damn :/ And this is the only way I can do this. Since its optimized for mobile too.. :(
B
9
S
1
Posts: 48
Reputation: 675

Post » Thu Jul 17, 2014 8:49 pm

Anyone have a solution? Please I am really in need of help :(
B
9
S
1
Posts: 48
Reputation: 675

Post » Thu Jul 17, 2014 9:08 pm

Couldn't you just move the platforms by setting it's position?
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 17, 2014 9:11 pm

I currently have r173 installed, I'll have a look at it tomorrow morning and see if it works. Thank you for the help LittleStain! :D
B
9
S
1
Posts: 48
Reputation: 675

Post » Thu Jul 17, 2014 9:44 pm

Without seeing a .capx it's hard top be specific, but you can recreate the control of a platformer character by manipulating a physics object with forces and impulses.
B
59
S
21
G
9
Posts: 641
Reputation: 9,787

Post » Fri Jul 18, 2014 4:35 am

Oh yes, I did try that but I didn't do it right, but I'll have a look just now haha just woke up :)
B
9
S
1
Posts: 48
Reputation: 675

Post » Fri Jul 18, 2014 6:13 am

I took a look at your example, fairly simple and straight forward :P I should have thought about that.

Just to clarify though, if I want to make it loop from left to right and left then right infinite times, do I just create a time frame to move a few pixels left then in a few seconds move to the right and loop that motion? :D
B
9
S
1
Posts: 48
Reputation: 675

Post » Fri Jul 18, 2014 8:12 am

The real physics solution for this would be like this:
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 64 guests