Search Unity

Animation causing game object to disappear(gear vr)

Discussion in 'AR/VR (XR) Discussion' started by HKSpadez, Dec 27, 2015.

  1. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    Hey all,

    Made a simple animation on a character via unity animator. The animation is simply a path for a guard to patrol on. It works fine when im just tweening between positions but as soon as I add rotation to the animation, my guard never shows up. he simply disappears.

    This doesnt happen via game scene play mode in unity editor, only when i run the game on the gear vr.

    please help.

    anyone else seen this? its hard to debug when i only see the issue when i plug it into the gear vr.
     
    NGC6543 and dubbist like this.
  2. dubbist

    dubbist

    Joined:
    Sep 10, 2012
    Posts:
    7

    I'm having the same problem: I've been testing animations on various simple objects and some work and some disappear.

    animating scale and bouncing physics are fine.

    animating transforms causes the object to disappear. I'm also trying to animate transforms on the camera, but they don't have any effect in vr. everything works in unity though.
     
  3. dubbist

    dubbist

    Joined:
    Sep 10, 2012
    Posts:
    7
    update. somehow got the transforms to animate.

    I used the OVR camera from oculus utilities and now I can animate the camera.

    only problem is that an object with rotation disappears.
     
  4. buckyslc

    buckyslc

    Joined:
    Dec 19, 2015
    Posts:
    1
    I also am having the issue described above. I have a scene with several gameobjects. One of the GameObjects has animation that includes rotation, and although it is visible in the unity game window when I hit play, the GameObject does not appear in the GearVR headset (after building an .apk and pushing it to my Note 5.) The scene as viewed through the GearVR does successfully show other moving GameObjects, such as POV changed using OVRPlayerController and gamepad, speedtrees responding to windzones, and grass moving with terrain wind.
     
  5. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    218
    Same issue:

    I use the OVRCameraRig. Its a child of an animated object and once its build to the Galaxy S6, the screen goes black. When I un-parent it, the camera works again, but the animated object is still invisible/hidden. In the Unity-editor everything works great, but not on the S6.

    Is really strange! If I find a solution, Ill let you know.
     
  6. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    218
    Ok, I fixed it by removing the Animator component and switching back to legacy Animation. I was able to convert the animationclip to legacy by switching to debug mode in the Inspector. Its a crappy solution, but it works for me....

    Goodluck all.
     
  7. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    i ended up just using leantween isntead of unity's animation system and was able to get around it. thanks for the replies !
     
  8. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Anyone submitted bug report on this?
     
  9. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    andrew-lukasik likes this.
  10. Nodrap

    Nodrap

    Joined:
    Nov 4, 2011
    Posts:
    83
    I submitted this bug yesterday.

    https://fogbugz.unity3d.com/default.asp?760759_i5nbciofoqiofb50

    Is caused by any rotation animation on the object. You can reproduce it easily by adding an object to a scene and animating some rotation. Build it to an Android device and it disappears. Wasted ages on this one! Am on 5.3.1p1. Had it on a UI element previously too, and logged that separately, but am guessing they're related.
     
    andrew-lukasik likes this.
  11. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi,

    Thanks for submitting that report. I've reproduced the issue and have passed it on to the devs for resolution.

    -Will
    QA
     
    andrew-lukasik likes this.
  12. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    Could this be related to the same issue?



    I am having an issue with a sort of slash attack that I put on the ovr controller.

    Thanks,
    HK
     
  13. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Last edited: Jan 14, 2016
  14. ElKrullo

    ElKrullo

    Joined:
    Feb 24, 2013
    Posts:
    17
    Thank god I wasn't alone. Having the same problem with Unity 5.3 and iOS. Seems like animations with rotation created in earlier versions of Unity still work though.

    Switching to Quaternion interpolation fixes it if you can live with that.

    However, that is not optimal when rotations exceed 180 degrees...
     
    andrew-lukasik and NGC6543 like this.
  15. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    The issue should be fixed in 5.3.1p3.
     
    NGC6543 likes this.
  16. Krivoi

    Krivoi

    Joined:
    Nov 25, 2014
    Posts:
    4
    Looks like this bug is still present in the 5.3.1p3.
    Can anybody else confirm please?

    Quaternion interpolation helps.
    Best.
    Alex
     
  17. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    The patch definitely helps but does not completely fix the problem. i can still reproduce it in some instances. i will make another video demonstrating this soon
     
  18. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    The patch didn't fix the problem. Confirmed.
     
  19. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    Is this issue just getting ignored now...? can we get an update on this from any representatives?
     
    NGC6543 likes this.
  20. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    I'm still waiting for the fix, too.
    Hey, I modified the animation clip and now it shows on my iPhone.

    ------
    Nope, after some work it disappeared again!
     
    Last edited: Jan 22, 2016
  21. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Thanks man, your work around has saved my day!
     
    ElKrullo likes this.
  22. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    I'd like to apologize for the confusion -
    There was another math bug being backported to 5.3.1p3. The animation-rotation issue is not yet fixed, animation team is on it. In the meanwhile please use the workaround.

    Sorry for the inconvenience.
     
    ElKrullo, NGC6543 and andrew-lukasik like this.
  23. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    I fixed the animation/rotation bug for Android/iOS and pushed that to 5.3.2 Patch 2. Should be available next week.
     
  24. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    thats great!
     
  25. tdeeb

    tdeeb

    Joined:
    Apr 28, 2015
    Posts:
    1
    Unfortunately I am still getting this problem on Android in 5.3.2 Patch 2. It is vastly improved from Patch 1 to Patch 2, but it's still not 100% fixed yet. My team has been forced to stick with Unity 5.2.3 because this animation issue is game breaking. Please fix this as soon as you can.
     
  26. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    @tdeeb: unfortunately your "this problem" is likely another one. Many users have confirmed the issue with Transform is gone, so you'd better describe what your issue us, or submit a bug report with a project attached. (A small project that reproduces your issue would be great).
     
  27. Nodrap

    Nodrap

    Joined:
    Nov 4, 2011
    Posts:
    83
    Was fixed in 5.3.3 I believe. Is certainly fine in my build now.
     
  28. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    I am definitely still having trouble in 5.3.3.

    It is better though. Previously i'd see this on any objects but now i only see it happen on the objects close to my player. like my game is a fps melee/sword combat game. if I move the sword fruther out so i can see the whole thing then I have no problems. but I definitely run into issues when its too close to my player. Maybe theres an issue if it is colliding with the camera or something?
     
  29. Nodrap

    Nodrap

    Joined:
    Nov 4, 2011
    Posts:
    83
    A long shot, but it wouldn't be culling the animation as it thinks its behind the camera? I presume the animation update is set to always? I'd suspect a different problem for this case now.
     
  30. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    @HKSpadez Does your Animator component's Culling mode is set to 'Always Animate'?
     
  31. HKSpadez

    HKSpadez

    Joined:
    Apr 24, 2013
    Posts:
    87
    ahh. i turned it to "always animate" a long time ago but switched it back when it didnt help. but this was when it was still having the original rotation animation issue on the older version of unity. never bothered trying "always animate" with the new vers of unity. thanks guys. that was my problem.
     
    NGC6543 likes this.
  32. stevenbrent

    stevenbrent

    Joined:
    Nov 22, 2015
    Posts:
    25
    I'd been having this problem too in the previous Unity build. As @ElKrullo posted, the workaround that fixed it for me was to change the Interpolation on the animation's Rotation property from the default Euler to Quaternion. And after updating to the 5.4 Beta build, the Euler animation seems to work as expected, meaning my rotating thingies aren't disappearing.
     
  33. dpizzle

    dpizzle

    Joined:
    Feb 2, 2013
    Posts:
    31
    This bug is still very much present in 5.3.4. Culling is set to always animate and I'm still seeing what @HKSpadez has in the video above. Is there a work around for imported FBX's with animation? I don't think I have the ability to set the rotation property if I'm not creating animation inside of Unity.
     
  34. seanNovak

    seanNovak

    Joined:
    Aug 12, 2013
    Posts:
    12
    Any update here? Solution? Driving me crazy. :eek:o_O:eek:o_O:confused:
     
  35. Haristess

    Haristess

    Joined:
    Nov 3, 2017
    Posts:
    19
    seems this problem is still around.
    Ive created alot of grass variety in 3dsmax, animated them using morphs which is the only way to export to unity without using bones, and once in unity, some grass objects appear, some dont.
    I also found out that by deleting the animation componant makes your objects reappear in play mode.

    also if it does have anything to do with rotation, as users have mentioned above,why is it i never rotated any of my grass morphs during the animation phase in 3dsmax, that i presume would have created this issue?
    I have a funny suspician it has everythign to do with FBX exporting. FBX is horrid considering you cant export basic modifiers from max such as bend, noise etc, and i know FBX isnt always reliable, and requires you to export a few times for things to finally work.