Let objects push the character

Hello everyone, I have a room that slowly decreases in size, eventually smashing the player. The problem is that while the walls will push the player, they wait until he is about half way through the wall, and then jerk him forward, and sometimes don’t push the player at all. This works fine with meshes I have in my scene, as they are smoothly pushed, but not with my player. I have looked around for sleeping, and a few other things that may impact this, but have found nothing. My play DOES get pushed smoothly if the player is walking into the wall, but does not while standing still. How can I fix this?

By “meshes” do you mean static meshes or did you build them using the BSP brush?

~ Jason

They are just actors that I spawned that contain meshes.


Have you tried pushing the collision on the meshes out a bit further?

I had some clipping issues previously and that solved the problem.

~ Jason

I am not having a problem with my meshes, it is working fantastic with my meshes, but not with my character, it’s as if my character’s collision is only updating once every 2 seconds when the walls push him.

I’ve got the same problem. When an object pushes the character it is really jerky.

AH I see.

Sorry for that.

Ok, so what type of character are you using?

Can you post an image of the pawn (or whatever you are having the player control)?

~ Jason

AFAIK this happens with the character in the FPS template.

I’ve only ever had a problem with the character clipping.

I wonder if you could just extend the character collision space.

Can you post a image of the blueprint setup for the actor?
It may just be a odd node of something of the sort.

~ Jason

I doubt it, the problem only occurs when the player isn’t moving (no blueprint activity), do you still need the BP picture?

Yeah, let me see it anyway if you can get one.

There’s got to be a problem with the blueprint if not the collision.

~ Jason

Here is the movement:

How do you implement the moving walls? That is the important part.

I’m uncertain there is a real built in solution for this. A character’s collision is primarily implemented as part of the movement component, so the character’s movement will react correctly to external objects, but if the character is stationary and the external objects are moving, it won’t work.

To be honest I’m surprised it works properly for your meshes, unless they are physics objects?

I think probably you’ll have to simulate this yourself, by detecting for overlaps and moving your character accordingly.

I don’t know if this is correct but if I may estimate, that he is trying to use a flow of air coming from a vent pushing the player off a platform, like in knack, or Mario, or rayman, or sonic, either that or he is trying to use a wall that is like the ones in super Mario 64 world 1 painting #1 or super Mario 3d land.

So basically one would need to force character movement.

How about attaching a trigger to the meshes and upon entering the character slowly gets translated to the right or left?

Would that work?

~ Jason

EDIT: Jamendxman3, can we see your mesh as well as whatever blueprints your using to make it move?

Here is a picture of my wall blueprint, I am just scaling the wall, but the issue also occurs if I move the wall instead.

My meshes are nothing special, just a set of numbers 0-9 with a standard box collision on the mesh, I just spawn them in my scene, and the walls push them closer to the center as they should. I also just tried adding an extra box collision to one of the sides of the walls, but the problem still occurs.

Yes, I think using a trigger like that would be a reasonable way to achieve it.

Basically, (and I’m kind of guessing here from what I’ve seen, but I haven’t looked into the engine code in detail) as far as I know overlap states will only cause objects to move in the case of physics objects. Character movement also has code to push out of overlaps, but this is only really meant as a way to resolve states that shouldn’t really occur. Anyway it only takes effect when an attempt is made to move the character.

@Jamendxman3: Are your other meshes set to simulate physics? If not then I am missing something, as I wouldn’t expect them to get moved just as a result of rescaling a wall.

You just brought up a good point.

It’s probably because the wall is simply being scaled.

Jamendxman3, It would be easier to just use a dynamic actor; basically a door system needs to be created.

Animate the mesh to move closer in when the player steps on a trigger.

I’d look into simulating physics as well.

~ Jason

It is not because it is being scaled, I tested having the 4 sides of the wall just move individually without any scaling, the problem was the exact same. Also, what do you mean by looking into physics simulation?

If the meshes are static you can simulate in-game physics with them.

I was agreeing with kamrann’s previous post about physics simulation.

Alright, wait, you said four sides.
Are you enclosing the player in a box-like shape (one wall coming from the north, one from the south, etc.)?

Then again, I still go back to just using a trigger that will translate the player.
It seems there is a collision problem and this seems like the easiest option.

~ Jason