OnComponentBeginOverlap Object rotation (over time) not working correct
Hi, i'm trying to rotate an object by -90° on OnComponentBeginOverlap. But when my character enters the box collision, the object is rotating by -180° instead of -90°. Of Course i could set it to -45°, but it would still "feel" wrong...
I also tried to rotate the object -90° in 1 Second over time using a timeline and a Lerp. I've set the Alpha (Float) from 0 to 1 over a Lenght of 1, but the object was rotating more than -90°. Actually its a constant issue i have with using the timeline to move or rotate objects over time from A to B. It always goes beyond the target, where it should stop... What am i doing wrong?
asked Sep 07 '17 at 07:06 PM in Blueprint Scripting
Have you checked if your Overlap Event fires multiple times? You could use a Once node behind your OnOverlap to prevent your object from rotating too far.
OnEndOverlap you can reset your Once again, that should fix your issue.
answered Sep 08 '17 at 01:15 PM
Hi, well yeah Set Rotations in UE are pretty much useless, the only way for me to deal with rotation in Blueprints its through add rotation, try adding or decreasing 90 degress with AddWorldRotation instead.
PD: SetRotation auto manage your rotation from negatives and positives and blabla, weird behavior everywhere, that is why I always use Adds
answered Sep 07 '17 at 08:21 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here