My Pawn won't spawn

So I am trying to start a basic sidescroller game using the SideScrollerGameMode template, but I’ve found that my custom Pawn won’t spawn in my map if it is above a platform. I am using a skeletal mesh with a physics asset, and spawning it in using the PlayerStart. The pawn will only spawn in when it is not above some object in my map.

There are multiple things that can cause this. Can you check the node that spawns the actor? You should have options like shown in the image bellow. Try to play with those. Probably the issue you have is that platform is colliding with your spawn location. So move it a bit on top, or bottom (depending where platform moves).
Or, you can try to use “Always spawn”, and see what happens. If your character flies away, then the issue is, it spawned in the platform.

292528-spawn-actor.png

1 Like

If the pawn collides with an object as it attempts to spawn it may not spawn. So it could be worth checking the collisions on your custom pawn to see if they could be interfering with other objects in the scene.

2 Likes

I don’t think there is a rule of making collision a root component, but I might be wrong. No matter where I placed it, it always worked for me :).

Try spawning your pawn anywhere and use F8 to exit out of your pawn. Then, in map editor select Show->Collision. You will then see all collisions and you can easily move your pawn and test if your collision works.

Another test would be, to just make your collision really big and move visible asset of your pawn up. Then start the game and see if your pawn “floats” over the ground because of collision. That should tell you if your collision works.

Thanks for the reply, so my pawn is colliding with the platform below as it flies off when I set it to always spawn. I think Im not using the correct collision box because my pawn will only spawn when I move it so that it is not above the platform. I have created a collision box that fits pretty snug around my mesh, but I don’t think its being used. Should I make my collision box the root of my pawn?

So I was able to view the collision on my pawn, and it appears as if it is an infinite rectangular prism extending in the Z direction. That’s what I expected, but I’m not sure how to change that.

That’s how I made the collision, but it seems that my mesh is defaulting to a very very long capsule compenent (I was able to zoom out enough to see that it wasnt just an infinite column)

How did you make the collision? What type of collision do you need? If it’s jut base rectangle, use (in blueprint) Add Component → Box Collision. Screenshots would help us help you :slight_smile: