Hi all,
I got an issue when making a door that can open and close by using timeline. I want the time for opening and closing completely is 2 seconds and rotation is 90 degree. The weird thing is if I use -90 (minus ninety) in timeline (that will make door work in right direction), I cannot close the door after open. No problem happen when I use 90.
Can anybody help me on this?
Thank in advance.
Could you post a screenshot of your blueprint and timeline?
I am making an archviz game. The meshes of door are from Revit and far away from origin coordinates. So I put all movable meshes under a scene. They are door panel and handle. Then I rotate the scene.
I’m not sure if the issue is a bug.
Thank for your reply! I have added more sceenshot in my comment above. Please take a look.
OMG! Thank you so much! I’m not sure understand your advise about lerping from 360-270. But you code worked well and fixed the issue in my code.
I have tried your numbers (360-270). Still work well in your code. In my code, it just open and close the door one time. Then cannot interact the door any more.
- On begin play or construct… Save the initial
Local Rotation
of the door mesh in a variable. (This value should never be changed.) - Add the timeline output degree with the value stored in the variable.
- Use this value to set the current
Local Rotation
of the door mesh.
Have you tried lerping from 360-270. Your code looks like it should work.
I cleaned it up a littlebit to help.
Ah, good to hear it! 360->270, is the same thing as 0->-90… just rotated 360 degrees.
Anyhow, glad that worked for you.