unintended visual slide on platform [fixed]

Get help using Construct 2

Post » Wed Aug 29, 2012 5:12 am

EDIT: This problem has been fixed as of release R121.
Here is the original Visual_slide.capx now exported from R123.2 the effect is no longer present.
Original Demo exported from R123.2




When trying to create a moving platform I often notice the player "sliding" while standing on a horizontal platform. If I measure the distance between the player.X and platform.X it does not seem to change. But visually I can see a slide effect. it can be made more pronounced by speeding up the platform.

Has anyone else noticed this?
if so any suggestions on how to work around it?

live example
https://dl.dropbox.com/u/3285817/visual_slide/index.html

capx download
https://dl.dropbox.com/u/3285817/visual_slide/Visual_slide.capxonzephyr2013-03-25 17:49:09
B
84
S
12
G
9
Posts: 99
Reputation: 9,508

Post » Wed Aug 29, 2012 7:56 am

nice catch! @Ashley will definitely be interested
Though I'd probably move it to the bugs forum.

Keep in mind that the sliding doesn't happen with horizontal movement only: diagonal movement (via set position, and sine set to value only), diagonal movement (via 2 sine behaviors, one vertical and one horizontal) and wobbling (2 sine behaviors, different periods/amplitudes) are all affectedFimbul2012-08-29 08:00:32
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Thu Aug 30, 2012 10:01 am

Bumping this because it is important.
@ashley
?
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Thu Aug 30, 2012 10:10 am

Give Ashley some time xD I'm sure he'll get round to it.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Aug 30, 2012 9:49 pm

@Fimbul. You're right is does also apply to all the rest you mentioned. I was just keeping it simple.   

This "sliding" has been around for most of the versions I've ever used. But in r100 the vertical aspect of it was greatly improved. That reminded me of the effect. So I figured I'd ask about the rest.   Mostly looking for a work around. There are work a rounds for the vertical posted on the forums. They work in most situations. But I'm just not been able to come up with a good solution for the horizontal aspect.   
The only work around I've been able to come up with so far is a rather messy.
I've found if I move the platform By value , and disable platforming on the player When on the platform. Then update the player to be relative to the platform it works.   But Then I have the issue of creating events for everything that should be able to happen had I not disabled "platforming" on the player. It's what I'm currently doing for the game I'm working on. I just wish I could find an answer that does not involve disabling or greatly reducing the functionality of the behaviors to solve this issue.

Thanks for taking a look at the problem. Any input is appreciated.
B
84
S
12
G
9
Posts: 99
Reputation: 9,508

Post » Thu Aug 30, 2012 10:06 pm

@onzephyr,
Wow, that's a lot of trouble!
I just had and idea and I think I can find a much easier solution for you

Edit: nevermind, I thought I could add a sine behavior to the player as well, and sync it to the platform's behavior when both were overlapping, but you can't set the current cycle position.

@Ashley, can you implement setting the cycle position in the sine behavior?

The only thing I can think of to solve the problem would be to recreate the sine behavior and implementing the whole movement scheme manually via events.Fimbul2012-08-30 23:50:58
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Wed Dec 26, 2012 2:26 pm

Hmm, I have the same problem here.

When jumping on a platform, and the character is still in "jump" phase (diagonal movement) the character will slide to left or right till it hits a wall..

I tried a lot of thinks but haven't found a solid solution yet.. does anyone have a clue ?

Regards,
Rob
B
20
S
6
G
3
Posts: 18
Reputation: 5,103

Post » Mon Mar 25, 2013 2:46 pm

Hi. I'm stuck with this as well. Trying to figure out a work-around. I saw that the current cycle position is available now on the sine behavior so I worked my way around to getting the value back from the current sine behavior (the Y value of the sine movement within the unit circle) and getting the derivative for it so I could get a speed to use as offset for the player's position when on a horizontally moving platform.

Kind of awful and it doesn't look that well and I've gotta tweak the numbers a bit still. Any news on whether this is being worked on at all?
B
6
S
1
G
1
Posts: 15
Reputation: 1,014

Post » Mon Mar 25, 2013 5:40 pm

This problem was actually fixed a few releases ago R121. I intended to update this post but forgot until now. Sorry about that.
R121 release notes
specifically these two changes.
Change     
Possibly breaking change: Sin behavior now updates position just        before the events run, rather than just after. This allows for objects using set position to follow without lag. However this means events can now override the position which could cause existing projects to work differently. Please watch out for anything breaking.

Change
Possibly breaking change: Platform behavior now should follow moving platforms using the Sine behavior without any lag. However since the sequence it runs has changed, it may also cause existing projects to work differently; please watch out for anything breakin


Here is a link to the exact same demo as my first post but now exported from the most recent release.
Original Demo exported from R123.2onzephyr2013-03-25 17:42:44
B
84
S
12
G
9
Posts: 99
Reputation: 9,508


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 21 guests