Stencyl 3.4.0 is now out. Get it now!

[SOLVED] Major Collision Problems

RosalinaGalaxer

  • Posts: 36
I have attached several screenshots with debug drawing on below. 1 is how it should be normally.

2 sometimes occurs when turning around.

3 happens when walking away from walls.

4 happens whenever I walk downwards on that bridge area.

5 happens when turning around to get back on the bridge.

6 occurs while walking around in the water.

I've found that I can get out of the water by getting stuck to the wall, attacking, turning around, and attacking again, but that really shouldn't have to be done. If anyone has any ideas on how to fix this, can someone please help?

Thanks!

« Last Edit: September 15, 2017, 09:49:39 am by RosalinaGalaxer »

LIBERADO

  • *
  • Posts: 2343
It seems to be a problem in your character sprite sheet and the settings of the collisions shapes. Maybe your animation frames have excessive and unnecessary transparent space and your character is not correctly centered in each frame. Also, take account that the frame images of all animations should be the same size, and you must adjust the position of the collision shape in each animation.

« Last Edit: September 12, 2017, 07:30:13 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

RosalinaGalaxer

  • Posts: 36
All of my my animations have been cut down to the minimum amount of space, minus the first and last frames of the sword attack animation, but that's because the animation gets larger as it plays out.

JeffreyDriver

  • Posts: 1114
It's good practice to keep your frames all the same size, otherwise you run into problems. A little bit of extra transparency space around your actors won't impact performance.

RosalinaGalaxer

  • Posts: 36
That's what I meant.

My animations largest frame is as small as it can be, and all the other frames of the same animation are the same size as the largest frame.

I've done this before in games, but something like this hasn't happened before.

LIBERADO

  • *
  • Posts: 2343
Maybe the body of your character is not correctly aligned in all frames.
Also, maybe the position of the collision shapes is not the same in all animations.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

RosalinaGalaxer

  • Posts: 36
What do you mean by not correctly aligned?

And would it be easier if I sent you a copy of the game to test for yourself? It seems to me that that would be easier than explaining all in text.

LIBERADO

  • *
  • Posts: 2343
Before sending me a copy of the game, remove all unnecessary events/behaviors/images, and leave only the minimum code/sprites/tiles that allow to see the issue, then send me.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

RosalinaGalaxer

  • Posts: 36
Here is the .stencyl file. That way you can mess with it in Stencyl itself.

LIBERADO

  • *
  • Posts: 2343
As I said, the frame images of all animations should be the same size.
I have fixed it. The fixed file is attached to this post.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

RosalinaGalaxer

  • Posts: 36
Thanks a lot!

I honestly don't know what you did, but it works like it should now.

Thanks!

LIBERADO

  • *
  • Posts: 2343
I have added extra transparent space to each individual frame, so now all frames have the same size (96x96 pixels), I have centered the character body in each frame image, and I have correctly adjusted the position of each collision shape.

« Last Edit: September 15, 2017, 10:11:10 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.