Problems with jumping

Get help using Construct 2

Post » Fri Apr 22, 2016 11:20 pm

Hello,
I'm having an issue where the player sprite is hitting an invisible ceiling when he jumps. It's like there is an invisible object an inch over his head. Only happens when I jump from a still position and doesn't happen while running and jumping. The problem goes away when I remove "ID_JUMP" from the animations list. (but then I have no jump animation but invisible ceiling gone)

This happened while using this tutorial video on youtube:
https://www.youtube.com/watch?v=W9cyLLU6mKk

Here is the capx file:

https://drive.google.com/open?id=0B32f6 ... TJtckZLNm8

Thanks
B
4
S
1
Posts: 7
Reputation: 316

Post » Sat Apr 23, 2016 12:23 am

Seems to me that your collision polygons are messed up. They wiggle (animated) arround the origin.
Meaning, if you change to another animation it happens that the player is caught up in the solids. The platform does not know that on the moment you change animation. It finds out when you move, in your case, when you jump from idle. Now the platform should be stuck, but it has an automated 'push out of solids' mechanisme. And that is what you see happening. This mechanisme is essential. So ...

Be more carefull with the collision poligones, when working with animations.
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Sat Apr 23, 2016 12:57 am

Thanks for your response 99. Should the collision boxes be as close to the edge of the sprite as possible? like this? That is currently how I have all of them, basically right around the character in a square

https://drive.google.com/open?id=0B32f6 ... VY5OC1NaHM

I have all the origin points set to the bottom
B
4
S
1
Posts: 7
Reputation: 316

Post » Sat Apr 23, 2016 12:58 am

↑ Be more carefull with the collision poligones
&
origin point set to bottom for all animations(check-"IDLLE")
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Sat Apr 23, 2016 1:41 am

I made sure all origin points were set to the bottom...they must have not been before because it changed after I did that. Now the jumping is fine but when he lands from the jump he has seizures and shakes in place

I took video of the collision/origin points for the animations and what it looks like when I run the layout

Its hard to see him bugging cause of the low framerate speed of the video but you can see it at the 1 minute 15 second mark...hes doing that super fast...and only after landing form a jump

https://drive.google.com/open?id=0B32f6 ... FZBN3d2NkE
B
4
S
1
Posts: 7
Reputation: 316

Post » Sat Apr 23, 2016 11:46 am

https://
drive.google.com/open?id=0B1SSuCVV8v74MUl2cnIySnEyeWs

it was a bit more then that
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Sat Apr 23, 2016 12:57 pm

Thanks for taking the time to do that 99....much appreciated!

When I tried to download it , there was a message saying my release was too old to open it, so I updated it and opened it and everything works fine i your capX file. I currently have both capX files up side by side and analyzing the hell out of them to note the differences.

Thanks again
B
4
S
1
Posts: 7
Reputation: 316

Post » Sat Apr 23, 2016 1:52 pm

It's good practice when using platform movement to make the player platform behavior sprite an invisble non-animated simple shape like a rectangle and then put all the animations in a separate sprite object that is pinned or otherwise set to always have the same coordinates as the other. That way the invisible sprite handles all the movement and collisions, and then you don't have to worry about collision polygons on your animations at all.
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 202
Reputation: 3,462


Return to How do I....?

Who is online

Users browsing this forum: alextro, Colludium, Ryan Kocourek and 7 guests