I wouldn’t have thought that either, but RevOverDrive showed how that a small cube or lip can be added at bottom of wall and it solves the problem…assuming its all at one level…I tried that solution…and concluded it was the shape of the capsule that caused the jumping effect in the OP. The diagram above I tryed to show that.
Right now really simple…it is just a camera actor and a cube attached…the camera moves…it moves…
That code on the bottom does not work, but what I was hoping for was on over lap of the moving cube component the third person character would be moved along at the same rate and direction as the wall. If I trade that on overlap node with an event tick I get this…Vimeo
For this kind of game design that effect will be needed, so I will keep that noted, but I noticed when it was like that everything worked as it should all but it auto dragging the player, so then I tried many things to trigger or gate that effect and I kept having problems.
I tried a few other things with custom collision channels, but then of course, if you make the capsule to be ignored and think you can add your own something to collide with it does no good as nothing can be placed higher than the capsule in the character hiearchy.
At the end of the day, the goal is to have the wall gently nudge the player at the speed it goes and not the jerking motion from the first video. But then…maybe it is now an issue of not seeing the forest for the trees. If the end goal is to make a ship / craft side scroller type game, then that would involve custom stuff, and that would mean using your own boundaries (likely square) for the craft.
I haven’t tried Rev0verDrive’s way yet, so if it works it works, does it always work 100%?
Here’s what I came up with
Solution #1: You can go into the character and select that capsule and enable physics but then your character will fall over onto his face when you try to walk! try it out. If there’s a way to actually set physics it might fix the problem.
Solution #2: Make a collision box attached to the wall which is slightly bigger than the wall, use a overlap event to cause an AddForce node to push you. I got it working that way but it’s just a tiny bit jittery. Setting movement mode to flying stops the jittering so I think it’s caused by ground friction.
All of this seems pretty hacky, and is probably not “the right way”
Commonly you do it via cpp or BP when activating ragdoll.
In fact. You can probably set the root bone to simulate physics and have it be pushed naturally by the wall, which then takes care of moving the capsule.
jitter is normal if you are replicating and looking at a client.
It’s not otherwise. So if your single player is jittering you are doing something wrong.
(Which could be as simple as needing sub step on).
The right way, as I said before, is that it just works - for single player.
Maybe remove the player mesh from the equation.
Test with a character BP and the default skeletal cube/rectangle.
Do expect jitter and snags in replicated clients. Always.
Expect mostly fluid motion in PIE and in single player (and if it’s not, turn on substep and possibly increase the rate of it).
Let’s also state this.
Are you using the utter and total mess appropriately dubbed Chaos.
Or the old and neglected implementation of PhysX?
It could very well be that you get bad results in Chaos vs what used to be in PhysX.
(Before someone asks, you have to build from source to use Chaos, so you would know).
Assuming its all level ground…the same horizontal.
Ha, yeah when I turn physics on the capsule component the player can’t move. Perhaps there is a way to do that correctly.
That solution seems like it would actually work. I tryed something similar earlier in the thread, have the player constantly pushed along at the same rate as the wall, and just trigger or gate the effect so that it only does it when the player’s capsule overlaps the wall, I don’t know why but I could not get that to work. Vimeo
I might try with AddForce later.
Might be able to do something with that then.
Yes, I would think there is an easier and more straight forward solution to do such a relatively simple thing with this engine, perhaps some poster can come in and enlighten us all.
Sorry for digging out this thread, but I also have this problem:
Up works without problem:
G85IiuqQL0 GIF | Gfycat
But if I push a character to a side it looks like this:
4o6XU8Y3Tl GIF | Gfycat
ATOvBIhS9n GIF | Gfycat
I have the same problem, help!
Have either of you solved this issue yet or do you both still need help?
It probably would be a good idea to create your own threads in one of the development sections if you still need help."
There’s been a few options for you to try. You can’t seriously tell me/us that none of them worked.
Here’s another option too:
You should be able to set the option of simulate physics on the capsule to ignore the Z axis.
This should make it so that the capsule won’t fall, but it will bounce and slide.
Since the character and animation move with the capsule, everything should follow along nicely unless you are trying to replicate across networks.
Well, there was a single offered solution that works, assuming the player is on level plane. But not for unlevel ground / platforms. And an explanation as to why the effect was happening. I have tried other things suggested here and not much luck.
I would then consider this situation to be unresolved.
Could you be more specific in terms of the physics panel? When I turn simulate physics on the player CC, it seems to not be able to move, I toggled x, y, and z options but the player still could not move.
If there is a “point” to my last post in this thread, it would seem that I’m not alone in this situation and many others also have the same problem dating back many years ago and is also unresolved.
I would then think this problem is worthy of being elevated to an “ask” question.
However, it seems I can’t do that…
I appreciate any and all comments and suggestions offered in this thread, again thanks.
While that’s not at all a bad idea:
Do it in c++, I couldn’t encourage you more to so so…
What I was saying to do was to trigger the physics effect when touching the moving wall, and subsequently disabling it again based on character position over time.
Say, if 2 or 3 frames pass with the same character location, you know for sure you stopped being pushed. So turn the simulate back off.
If you ever plan on adding ragdoll effects and getting back up from it, you have to do this no matter what.
The only difference is that when you turn simulate physics on with the wall, you also have to lock the appropariate axis.
So, while this may not be a proper “solution” to the problem, if you have a system in place or will need a system to add ragdoll effects, it’s probably better to also leverage it for nice push transitions without adding extra overhead to it.
I will surely get to C++ eventually, don’t know if I am ready for that yet lol.
I still think something could be or should be able to be done with that kind of approach, physics based or otherwise. Get the location and velocity of the wall, and if the player is overlapping (capsule or mesh) then do something, In what you just described it would be to turn physics on and apply a force when overlapped then turn off when not. Going back to earlier in this thread… if I apply this code below to the third person character.
You will notice on that video that the stepping effect does not happen, but then the player is being pushed along, “offset”? all the time anyway.
Imagine then if that effect happened “just” when TPC overlapped the wall. As pointed out earlier in this thread, the problem is not when player jumps into the moving wall, as collision will cause the capsule to be blocked, and blocked smoothly, the problem then is when player Is Landed and is pushed by the wall, and the inherit shape of the capsule component causes this stepping effect.
If the wall makes contact (hit event)
Toggle the physics simulation.
The push and movement should just happen without anything special since you are now setting the capsule component to be able to simulate/react to the environment (That’s the point of toggle simulate physics on/off).
Then you just need some sort of system that brings you back to not simulating.
So then in the camera actor blueprint that has the moving cube attached to the camera, I check for collision between the moving cube and that box I just added to the TPC, and if so I add an offset matching the moving cube’s offset / speed.
Also, you probably don’t need the box. You can detect collisions purely from the pushing box, and implement an interface on the character Or just cause the box to move the character after it detects its a character.