Cover system on curved surfaces
Hi! I have been working on a cover system and gotten quite far. However I have run into a problem. I use linetraces to find a cover and use the hit location to set the characters position and the hit normal to set the rotation. The character can also move along the surface as it should. While in cover the character shoots a linetrace, with the opposite direction of the latest cover normal, every frame. The hit information updates the rotation and position ever frame. However a problem emerges when taking cover behind convex surfaces. When the character reaches the edge of a face and hits a new face, it changes the rotation to align with the new face. But with this new rotation the next linetrace hits the old face so the rotation is set back. So the rotations switch between to values at 60 fps so the character starts jittering. I hope I managed to explain sufficiently the problem that I am facing. I have been trying to solve this for a long time but haven't been able to solve it yet. Does anybody have any smart suggestions? thanks for your time :)
asked Apr 28 '17 at 03:54 PM in Blueprint Scripting
try RinterpTo, instead of instantly turning. use more than one trace, then average the results.
answered Apr 28 '17 at 11:55 PM
While we check your code I could help you with common logic. When the character finds angle by casting traces and checking normal changes, you should change not only rotation but location to. Move character to new snapping position. And while you so that skip normal checking.
answered Apr 29 '17 at 02:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here