How to keep pawn not to pass through the walls?

Hello,

I’m quite new in UE. I’m using Flight vehicle template in UE. But my Pawn passing through walls for some reason. I tried to put collisions to walls, to my pawn. But didn’t succeeded.

How to solve this problem?

3 Likes

Have a look here:

In short, use a movement component or Sweep.

You will need to include more details regarding what you’re doing:

Image from Gyazo

It didn’t help. I use movement component - FloatingPawnMovement and AddMovementInput function to change position from InputAxis MoveUp and MoveForward. But it still doesn’t work

  • post a screenshot of the blueprint responsible for moving
  • ensure the elements that are supposed to collide have colliders
  • ensure the collision settings are set to block one another

The generic, default settings are generally OK - as seen above. But perhaps you switched something around or something is missing in your setup. That’s why we may need to see more first in order to help you.

I recreated my project from scratch and got the same result
I just want to move my cube like you did.

This is my Pawn:

This is how it moves:

And this is a wall:

Have a look at your Pawn’s hierarchy, especially at what’s there at the very top - the Default Scene Root is a scene component and has no collision of its own.

When the Floating Pawn Movement component is asked to move, it cares only about the root and nothing else, ignoring the box collision and the cube.

When using components for movement, ensure the element you wish to collide with is the root; you can drag one to the top of the hierarchy like so:

Image from Gyazo

4 Likes

Thank you so much!!! It works! I’ve been suffering with this for a very long time. And now it works like you recommended!
You are awesome, man! Thanks and have a good day!

It’s you again. Thanks so much! real wizard.