So I have a four-legged scarab-esque vehicle that consists of 9 static meshes that animate in unison using interp/set location/rotation methods. The vehicle has come out better than I could have ever expected, but I have been struggling to get a proper system in place that allows it to dynamically interact with any trees it collides with.
Currently the vehicle traces a sphere around itself, detects static foliage instances, deletes them, replaces them with an actor, and copies the static mesh and world transform of the tree it is replacing. This works perfectly, but the actual interaction between vehicle and tree is what I’ve really been struggling with.
Originally, the actor had a static scene component positioned just under the ground, which was physics constrained to the tree static mesh, locking X, Y, Z positions and Z rotation, with free rotation on both the X and Y axes. As the vehicle collided with the trees, they would rotate around this pivot mostly as expected, but due to the way physics in UE4 works right now, they would inevitably jitter like crazy, and sometimes detach completely from their physics constraints. This totally destroyed the sense of immersion that this system was intended to create.
I should also add that turning these trees into skeletal meshes is out of the picture in this case.
So I’m thinking that instead of using physics, I could drive the rotation of the trees manually during overlap events, but this is also turning out to be pretty difficult in a mathematical sense. Due to the fact that each leg is moving individually from one another, they could be colliding with the tree at virtually any angle.
So, I’m wondering if anyone knows of any ways that I could either:
1- Stop the tree physics from freaking out (I have already played with angular/linear damping, projection, velocity limitation, and solver iterations, but to no avail thus far) or,
2- Rotate the trees manually based on the location at which they are impacted by the vehicle
I would be so grateful for any help, this has become a major headache!