Download

Rotation Timeline makes Object Snap to Target Before Working Properly

Hello. I’ve noticed a problem when working with float timelines that I’ve changed to rotation values. I have the script so when I press a button, the object will rotate 90 degrees and when I press it again the timeline will reverse. When I enter play mode and attempt to rotate the object, it snaps to 90 degrees. When I press it again the object rotates smoothly like it should.Here is my script and timeline.

495d5ea44a16f8367cf3aa1295c451a72aac312b.png What am I doing wrong? Any help is greatly appreciated. Thanks

Hello,
Have you try to “play from start” and “reverse from end” ?

That seems to work, but when I press the key before the timeline has completed the object snaps to the beginning. I want it to be like a door where the player can play and reverse the timeline and have the object move smoothly. Or I could have it where input with that object is locked until the timeline has completed. Thanks for your help. :slight_smile:

I have juste realize that your issue is from your bool “door status” which need to be true on start and is false. Change it and use play and reverse and it would be ok.
To lock event, check a bool on event “interact”, on false you do the event, not on true. You set it true just before timeline (both play and reverse) and set it back to false on finished. Then all clicks when timeline is active will be ignored.

I’ve done as you instructed but when I try to open the door it still jerks open 90 degrees. Maybe it’s a problem with my timeline and how I changed the float timeline to a rotation one.

AH! I didn’t make the door a child of a scene component. That’s fixed everything. Thanks so much for your help! :slight_smile: