Pretty much as topic says. I’ve built a simple level with basic floor, jump pad and two ledges in the air using paper2d (flipbooks and sprites).
The problem is when my character collides with something it falls from the ground sprite.
Any idea why this is happening?
Cheers
Hello,
you have physics interactions between your player character and the floor?
If yes constraint them to the Z axis so he wont move into that plane and lose contact with the floor collision box.If no give me some more information and i will try to help you out.
I’m pretty new to gamedev so I haven’t really set this stuff.
I’ve just put some sprites as the ground, character and ledges, also I’ve set the collision to shrink wrapped and that’s pretty much it.
It works fine but let’s say that I got under the ledge and when I jump and hit the ledge, the character falls off the whole map.
Did you start with the 2D template and added your stuff there or from a blank project?Your problem is probably what i described above.when you create a sprite it creates a collision box as well.You can adjust how “thick” this collision box is.
Lets say you have your player sprite at Y=0 (Unreal uses for 2d Z as Y)and your player sprite has a collision box with a width of Y=1.If it is centered then you have a collision surface that expands from Y= -0.5 to Y=0.5.Now if your floor has the same and your sprite moves inside the Y Axis more than 0.5 in either direction then it would fall off.
So to troubleshoot it yourself you should give your floor a big(like y=100) collision surface and try again.If he does not fall off the ground then you know that that’s the problem and you should take it from there.
I had the same problem. I was in “Front” view and my character kept going through the ground sprites. I found that my player start was not actually above the sprites I had placed. Switching to “Perspective” view and readjusting the position of your character start over the ground sprites might do the trick. It did for me.