#The character keeps clipping into the wall

1 messages · Page 1 of 1 (latest)

pliant swift
#

I don't know if it's a coding thing or a problem with the nodes: all that I know is that the character could move fine before in the art gallery scene, but now they can't. I think it's something to do with the fact that there's the same kinematicbody2d in both scenes that both use the same script to move and it's getting confused, but it worked fine earlier, and I don't remember how it got like this because I was coding this at midnight about a week ago. I've messed around with it already but the same thing keeps happening. If anybody can figure out what I did wrong then I'll be grateful as the game is unplayable in this current state. Because I'm not exactly sure what the problem is, here's the entire game so far https://www.mediafire.com/file/xdi0ccqforzr9m0/The_Sapphic_Princess.zip/file . There's only the start screen scene, the art gallery scene the street scene and the battle scene (the last 2 are still a work in progress) and the problem lies in the art gallery scene.

pliant swift
#

so I turned the talking variable into a global variable and now whenever the character can walk (when talking = false) they glitch into the wall. Also when the door was clicked the entire thing crashed for some reason.

#

walking script

#

i fixed the door

#

the rest of the script in the scene looks similar to this and works as intended

pliant swift
#

The character keeps clipping into the wall

pliant swift
#

I've figured out that the problem is in the walking script as it also affects the character in the other scene (they just stay put). I'm not sure why though. It currently looks like this:

#

is it a velocity problem?

pliant swift
#

i added a script that constantly prints the velocity and that seems to work fine

#

so idk what's wrong

vital coral
#

Try "unindenting" the move_and_slide call to be on the same indentation as the else keyword. Try commenting out the yield functions too, as they might mess with the physics

pliant swift
#

i'm not sure how but now the character's on the other side of the wall