My static meshes keep going through each other?

My static meshes keep overlapping one another. I have set the collision to block all and the collision around the meshes are set up properly. I even tried to use a box collision and it still didn’t work. Can anybody help?

How are you moving them? If you Set Actor Location or Add Offset, no collision can help unless you tick Sweep.

Also, as the helpful tooltip suggests, ensure the element you wish to Sweep with is the root of the actor.

1 Like

Yea I think your right, the addoffset is probably making the collisions not work. Is their any way to keep the node and still get the collisions to work? Or is their another way?

Enable Sweep highlighted above and move the component, not the actor. Or provide more details regarding the interaction - the end goal. What are we making?

More info:

Ok so I’m making a game where cars are going in a straight line. When I tick sweep the cars stop moving. Here’s a link to what my blueprints look. edit My goal is to stop the cars from going through one another. That’s not very realistic. I have some that are supposed to be faster than others. That’s why they overlap. This all take place in a street.

I’m still a little bit new so do u have an example of how the vectors would look in blueprints. And I also don’t want physics.

If you’re making a game about driving cars, consider look at the Vehicle templates. There are 2 - simple and advanced.

This way you can very easily make the driving AI, too.


If you prefer to make the driving mechanics from scratch:

  • each car is a Pawn with a static mesh as the root
  • add a floating pawn movement with gravity
  • use vectors to move the car

This will give you smooth and responsive collision. The way you’re moving things at the moment is not suitable for what you’re trying to achieve.


There is no one node that makes things realistic. You will also need to decide whether you want to use physics. Depends on how realistic we’re talking.

  • here’s my bumper car Pawn:

  • its input:

Image from Gyazo


In short:

  • a Floating Movement Component is using whatever is at the root of the actor to calculate collision (here, a static mesh)
  • this component does a lot of heavy lifting under the hood and accepts vector inputs, so you can point it in a direction and say go in the direction the actor is facing (Forward Vector). In UE4 X is forward.

Here’s the project should you wish to play with this:

Do tell how it goes.

Can I use floats to make it go faster
over time?

Sure.

And my mesh isn’t controlled by the
player itself.

Does not matter. Make it a Pawn, give it a component and use a vector to move it around.

It’s a drastic mesh

Not sure what that is.


In the most simplistic of setups:

Image from Gyazo


Or with a pawn + movement comp

Image from Gyazo

In this scenario we end up with neat sliding collision.


It all depends on what behaviour you want and how you move things. There’s also physical simulation - yet another way of moving and colliding.

And even more ways of moving stuff around:

And if you do not know what to choose, share detailed info regarding what you’re trying to achieve. Otherwise it’s impossible to suggest something tangible.

It’s a drastic mesh that comes at the
player.

Like this is confusing and now very helpful at all ;p

Okay sorry for taking so long I’ve been very busy. I’ve tried it and haven’t had much success. Can I use floats to make it go faster over time? And my mesh isn’t controlled by the player itself. It’s a drastic mesh that comes at the player. When I use your method the mesh doesn’t move but has collisions.

My goal is to stop the cars from going
through one another. That’s not very
realistic. I have some that are
supposed to be faster than others.
That’s why they overlap. This all take
place in a street.

Pawns. You need make them pawns + movement collision comp - this way you can use AI and navigation data.

I used the floating pawn method. I was able to check sweep and my meshes were moving normally. However every time I change the collision from overlapall, my meshes stop moving? Did I do something wrong?

I used the floating pawn method. I was
able to check sweep and my meshes were
moving normally.

Don’t use both. Either Sweep or Floating Pawn Movement. Both at the same time make little sense (to me, at least)

However every time I change the
collision from overlapall, my meshes
stop moving? Did I do something wrong?

Not sure what that means. Why are we overlapping things? Should this be blocking?

Ok so I have static meshes that spawn in a line as cars that have different speeds. This causes them to overlap one another. I want them to stay behind each other. Also the player has to dodge them so they should overlap the player. I’ve tried most of the methods you sent but couldn’t get them to work. The sweep causes the static meshes to stop moving. Add movement input keep asking for a pawn in the target so that doesn’t work either. And the bottom two methods with the times, I don’t think will work. I honestly don’t know what to do, why would they take away collisions on addactorworldoffset.

why would they take away collisions on
addactorworldoffset.

No one took anything from anyone. You, as a developer, have the power to do whatever you want. If you want to clip something into the wall… you can.

Add movement input keep asking for a
pawn in the target so that doesn’t
work either.

But the moving car is a Pawn…

Is there anything similar to addworldoffset that i could use to make the meshes move?

Sorry, mate. But I really do not understand what is stopping you from doing the thing I suggested:

Image from Gyazo