5
$\begingroup$

To make this simple I have a .blend that you can look at. I have simple logic:

1) When the prop "Active" is true, our object is visible. When false, invisible.

2) When Spacebar is hit, "Active" becomes true, and an animation is played.

There is a problem with this: when active becomes true and the animation is played (spacebar is hit), you can see the last frame of the animation at the very start when spacebar is hit, then the animation plays. This seems like a simple error that can be fixed easily. I just need the animation to be played and the object to become visible, not both of those and a random frame to be displayed. If it seems confusing, look at the .blend I provided. Any help is appreciated, thanks!

EDIT: It is not the version of the engine for further detail. The simple issue can be fixed by updating the engine. I made this new .blend, which can be found here containing very similar logic to my scene. The visibility and the action happen at the same time, yet, visibility acts first. Open the .blend, hit 2 to make "active" false, then hit 1 to make it true. All you do is hit 2 and 1 with the new .blend, space bar was removed as I tried to replicate my scene.

EDIT #2: I just figured out the real reason. It's not the visibility. It's the animation itself. The visibility has nothing to do with my scenario. The timing is right, the visibility is occurring as created and implemented. So why is this happening? I changed the animation to work on a property, and it seems that, when you restart the animation, it slips in one frame of the original object. It ignores the property for one frame, right before you restart the animation. It doesn't show the end/start off the animation, but the object's original position. How would I know this? I changed the last frame and the first frame separately, and it doesn't "flash" to any of those. It "flashes" to the original object position ignoring the animations. What have we concluded? it is the animation itself that causes the issue. When the animation resets, it resets properly but slips in one frame that is not needed, in fact, not even a part of the property that controls the animation. It seems to be a bug in the engine, but I am not certain. Thanks for all the help though, looking to solve this ASAP. ;)

$\endgroup$
  • 1
    $\begingroup$ I don't think this is an error. Since the last keyframe of your timeline keeps it up there, when you order it go lower and perform the animation it teleports down there. It happens when it is visible too,but it is more distinct when it toggles from invisibility and does the animation. On another note, if you press P and then press "space","2","space"(very fast in a row) everything works.But if you press "space","2", then wait for couple of seconds and press "space" again the cube will become visible but the animation won't re-play.You might wanna check that. $\endgroup$ – Lev Jun 19 '15 at 0:48
  • 2
    $\begingroup$ Have you tried treating it like the animation was shifted forwards by one frame? You could easily cheat the system by moving the animation back by one frame, so the original first frame is now the last frame, which will be displayed first. $\endgroup$ – Nefer007 Jun 19 '15 at 15:36
  • 1
    $\begingroup$ I ran into a similar issue after updating a project from 2.72 to 2.73. Thankfully it's fixed in the 2.76 release candidate. Confirmed the same with your file. $\endgroup$ – pqftgs Sep 30 '15 at 2:04
  • 1
    $\begingroup$ Fix = update to 2.76, it's a bug $\endgroup$ – pqftgs Sep 30 '15 at 19:04
  • 1
    $\begingroup$ I don't have a good explanation for why that's happening. Even after 8 years the weird quirks and delays behind logic bricks are a complete mystery to me. However, a fix is to reset the action when Active == False like so: pasteall.org/blend/38338 or better yet I stripped everything out and wrote a script that does not exhibit the issue: pasteall.org/blend/38339 $\endgroup$ – pqftgs Oct 1 '15 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.