Download

Resisting the Force of an Impact

Hello Unreal Engine 4 community,

I have an inquiry regarding some collision behavior. Currently, when a dynamic object hits a static object, the dynamic object will tumble or bounce in some manner in response to the collision. This is, of course, expected since UE4 attempts to simulate real-world physics. However, I am wondering if there is a way to completely eliminate or at least minimize this type of post-impact movement. In other words, I would like for collisions in my game to affect linear velocity, but not angular velocity. I have provided a short video clip of a racing game called Slipstream GX that demonstrates this kind of motion deadening functionality. It was created with the Unity 3D engine, so I would suspect that this type of behavior is achievable in UE4.

Video Link:

[video]https://drive.google.com/open?id=0BxZoO3S7VzfSSmNpcjcxVUNsVEU&authuser=1[/video]

I have attempted to dramatically increase the angular dampening of my dynamic object upon collision using the “Hit” event, I have set the “Max Angular Velocity” of my object to zero, and I have also done away with friction in my collisions. Despite those attempts, I have yet to achieve results similar to those demonstrated in the video. Any pointers or ideas would be greatly appreciated! Thanks ahead of time!

Just a guess:
You could force the desired orientation with a set node that fires on every tick.
So on the begin of the motion, you get the current world orientation and set that agaian and again on each tick.
So even if the physics stuff wants to rotate your actor, you revert that immediately…
May not be the most elegant solution…

Thanks, I’ll have to look into that. It may work for my purposes.

I did manage to get most of the behavior that I was after by utilizing complex collision. I find it odd that the change solved most of the issue, though, because I was testing the collision by running my actor into a simple cube mesh. Technically, I would think that per-poly “complex” collision against a cube mesh would be no different than “simple” collision against a cube-shaped collision hull as both the hull and the mesh have six faces. Maybe complex collision does more collision traces per tick or some such thing that makes it more stable. Interesting, nonetheless.

Thanks again for the help!

Speaking of collision behaviour in SlipStream GX I simply locked the rotation axes of the Unity’s rigidbody so the physics engine can’t mess with my ship. I control the rotation myself using 2 raycasts, one in front and one on the back of the ship for alligning the ship to the track and I use Box Collider’s contact points and rigidbody’s velocity to control whether the ship should rotate due to wall pushing it or not. Also the rotation momentums are also maintained by code. Just sayin’ if that helps :slight_smile: