Search Unity

Animation Properties act different when running on Phone

Discussion in 'Animation' started by Fre4krider, Feb 9, 2018.

  1. Fre4krider

    Fre4krider

    Joined:
    Jan 17, 2018
    Posts:
    2
    Hi,

    I'm still a beginner so maybe my approach is not the best.
    I've got an catapult in my game which is shooting a stone.
    My Problem is to realease a flying Stone just in the right time of the animation.
    Therefore I have a "Dummy" Sphere on the catapult as a Child to show the stone while the arm is swinging.
    On the right time of the animation the mesh of the dummy gets disabled and a property in the animationClip is set to activate so a script can instanciate a flying stone.
    (Means: Dummy stone not visible anymore and stone with rigidbody starts flying)

    Everything is working well in Unity but if I build & run this on my phone, the stone is released way too late and the dummy stone (hard to tell if it's the dummy) is falling down after starting the animation.

    What can cause this?
    And is my approach the way to go?
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
  3. Fre4krider

    Fre4krider

    Joined:
    Jan 17, 2018
    Posts:
    2
    Thank you for your reply. The Solution in the tutorial is different and I think my solution is more performant.
    I figured it out now. I changed the built settings to internal and now it works.
    I also changed my animation property to an animation event which starts a method in my script.
     
    theANMATOR2b likes this.