Character Physics Impulse to Constraint Bridge?

Hello, I am making a map that has a bridge constructed of Physics Actors and Constraints. When walking over the bridge, it seems to awaken the physics (since they are not set to Start Awake), but it doesn’t seem to add impulses as I walk across. However, if my character mesh is simulating physics and falls onto the bridge, it will add impulses correctly.
I can set my Character Mesh to Block Physics Bodies, but doing so causes odd terrible results (getting launched into the sky or crashing the editor), unless that said Character Mesh is simulating physics as a Ragdoll only. When the mesh isnt simulating physics and is being carried around by the Root Capsule, I have to have the collisions for the Physics Body channel set to ignore or overlap. Therefore, the Root Component is the only thing capable of colliding with Physics Bodies to avoid glitches, but it only adds impulse when pushing objects from the side, and not when the character is standing on the Physics actor.
Because of this, walking across the bridge is safe, but doesnt add impulses to the bridge making it shake as you move across it. My guess is, this is happening because there isnt any meshes or actors on my character that are simulating physics to cause the proper interaction. Perhaps though there is a setting in the Character’s Default Settings, or something simple in the Root Capsule Component or Mesh I’m overlooking? Just curious how or if this can be solved.

Here’s a video demonstrating the specifics painting a better picture: https://www.youtube.com/watch?v=_8K7Zpt3i9E

Thanks for your time!
-Grayve Rose

I just tried to do something very similar, ran into the same problems. Did you ever find a proper resolution? I had to cheat for my own bridge - added a trigger volume that changes the density of the physics material on begin/end overlap.

I’m hoping some Character Movement functionality will be added in later updates but until then Im also trying to find my own work arounds no matter how bizarre. I made a friction system entirely from the ground up in my character’s blueprints because I wasnt very happy with the way low friction or even 0 ground friction affects players. I might have to do something similar for this.
I did notice some settings in the Character Movement called Touch Force and Push Force amongst things, but no matter what settings I’ve tried it didnt seem to matter when standing on something, but I did get different results when walking into a Physics Body.
Yeah a custom volume or something would prob be a useful way, or perhaps even something more in depth like have it detect if the player is standing on a physics body, and if true do some kind of impulse at the overlap or hit location. When you say “changes the density of the physics material”, for what mesh are you talking about and how would that make a difference? Trying to understand your work around so I can perhaps try it ha.

Overall, Ill keep you posted if I find a fix that works pretty seamlessly, and if its not too much to ask it would be kind if you could do the same ha

Will do!. Density of the physics material… okay… My bridge was a rope bridge, made of planks, each plank connected on each side by physics constraints in a similar way to your own setup. I made each plank a blueprint actor, and added a trigger volume on top of the plank. My thinking was that when a character entered the volume, it would increase the mass of the plank, when the actor left the volume, it would be reset. I couldn’t find a way to change mass scale dynamically, but I did find link text which showed another way to achieve the same end. So I added a float variable to my plank blueprint, and in the construction script set it to the density of the physics material. Then, on entering the trigger volume, it sets the density to that variable multiplied by 1.5, and on the exit of the trigger volume, sets it back to the variable with no multiplier. Therefore as I walk along the bridge, as I step on each plank it becomes 50% heavier.

Construction script:

Event graph:

And visual:

14511-3.jpg

Ahhh, ok I see exactly what you mean. That looks like a pretty straight forward fix that would be easy to implement. When you move across the bridge does the board you are standing on sag more than others and also does it cause the bridge to shake as you move? Based on the photo it looks like it is having the effect of sagging under the player, but curious what other things it may add. If it is a fix for all those things I will definitely use it. Thanks for the taking the time to creating the photos and linking them also, visuals did make it really easy to understand.

I’ve been thinking today since you replied about this issue, and I think I may of found another way around it. I love how in programming there are so many ways 1 desired affect or effect can be achieved, it makes it a lot of fun to problem solve and be creative.
I was thinking of a method that is based on adding hit impulses at the location of contact with the physics body that are scaled to the character’s velocity. So if you are moving fast, the impulse will be larger. Would prob also be a good idea to make it so Z velocity is stronger so even a light jump adds a pretty decent impulse. Could have it add impulses with a delay that’s time float could also be scaled by the Character’s Velocity. Could have a branch at the beginning as well that comes before everything that checks to see if the velocity is equal to 0 on all 3 axis, and return false, where true wouldnt do anything. Im not sure what I would use to detect if the player is standing or based on a physics object, but it would need to be something that updates as you move and not on Hit or begin overlap, more like event tick or something similar. I think the character movement has a Get Current Floor feature, and you could use hit information and other things based on that, that does indeed of course update constantly.

Ill try that idea out today and if it works Ill share it with images

Yes, I was getting a degree of sag but not a lot of shake, but that may be due to how heavily constrained my Physics Constraints are. I considered adding radial force instead of changing mass, but that’s a little bit broken until the next engine release ( see here ) - so I thought I’d run with the idea of simply adding downward force and see what happens.

So, I made an array of actors passing on top of each plank from the trigger volume.

And added force in my level blueprint to each plank. It does seem to add more realistic shake to the bridge. I’m trialling-and-erroring the amount of force to add. It seems to be at least 10k units before I see good movement.

Ah nice, good use of arrays, which I still dont know much about how to utilize. Let me know how that goes.
For my method I was able to get mine to work with a lot of included variables to allow for tweaking. Instead of using add force at location I went with Add Impulse at location. This is the system in its whole, but Im gonna break it down with a vid and show some alternative methods one could use for different physics results. Part of the reason why its so big is because I also programmed in bug prevention of getting the trampoline effect where players could jump on the bridge and get launched into the sky. If falling and the bool is set and you are moving faster than your jump z velocity, it will limit your Z velocity to match Jump Z’s so you can never jump higher than normal on the bridge in other words. Once you arent touching the bridge, the timer is allowed to count down, disabling the bool so that limit of Z Vel doesnt affect other areas of interaction elsewhere.

The daft thing was, I discounted adding impulse because in my head I thought it would have the opposite effect (launch the actor, not push the bridge). I like your use of the tagging to determine which elements clamp the actor. (Gives me ideas for a rappelling system…!) I have to say, well done!

Aside from that, I noticed that disabling all the “Impart” related bools in your Character Movement allows from much smoother bug free interaction with bridges and probably physics actors in general. I disabled X-Z, the Angular related one didnt seem to matter cause I think its dependent on the others being enabled. But just something to try out if you are getting some buggy movement when jumping or moving on your bridges.

Thank you, I put a lot of thought into it ha. Ah right, I didnt think the physics objects would be smart enough to consider force unless my Ragdoll simulated physics model was on the bridge, but when not simulating physics and using Character Movement for physics, I figured force wouldnt really influence much. If it has with what you tested, thats good news though and Im glad it does. The programming looks hefty, I did a lot more testing and actually added more features and fixed a lot of bugs. The order that the branches are in in that screenshot isnt ideal and creates some issues, one major one being that the bug prevention of keeping your player from launching into the sky from the bridge wasnt working in some situations. I added 2 distinct modes that code recognizes using Tags, one is “Stiff” and the other is “Saggy”. Stiff Mode only shakes the bridge and only when moving across it, and the rate in which it shakes and the impulse added is based on Character Mass and Character Velocity. Saggy Mode works almost opposite, so if you’re standing still you will be adding the most impulse, but also in this mode there is no rate in which it adds impulses with a delay, instead it adds it constantly which is what creates the sagging-under-your-feet effect. Saggy Mode is based on the same variables, Character Velocity, Character Mass, and now also the Physics Actor’s Mass too. The heavier the plank is you’re standing on, the less susceptible it is to sagging from your Character’s weight, because its weight only already has sagged it down quite securely one could say, so you’re interaction doesnt do as much compared to say, walking on light planks like ones made of wood on a rope bridge. Aside from the 2 modes either mode will accept jumping on the bridge, which adds a quick impulse based on Z (falling) Velocity and Character’s Mass. Ive recorded a demo/tutorial video Ill upload to Youtube if you want to see my results, and I might share my code directly as well.

Also, there’s some settings included in the Character Movement that are enabled by default and by disabling them it seems to get a much safer bug free natural movement when it comes to interacting with Physics Actors, especially bridges. Look for all settings related to “Impart” in your Character Movement and disable X-Z. Once I did, all my jumping worked everytime, and I now I dont get launched side to side as the bridge shakes nearly as much if at all.