playMaker

Author Topic: Camera Animated, but first frame is not where it should be.  (Read 3923 times)

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Hey there. I have animated a camera along a path, that's all good. When I start my app however the camera is at a different position for the first, maybe half second, then it moves to the position of the first keyframe and begins the correct animation. I get this with all camera's too.

I've noticed that if I select the animated camera in the heirarchy, it show's the same incorrect starting angle. It's as if Unity does not know the current time both in the editor and when the app starts.

eg. if I select the cam, move the timeline to 0:00 its correctly in place, if i select something else, then back to the camera, it is in the wrong place.

Any idea's??

Thanks!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Camera Animated, but first frame is not where it should be.
« Reply #1 on: May 21, 2012, 01:50:26 PM »
Strange. Does it do this with or without Playmaker involved?

If without, you might also try the Unity forums to get more eyeballs on the problem...

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: Camera Animated, but first frame is not where it should be.
« Reply #2 on: May 21, 2012, 06:30:03 PM »
hey, with and without, I posted on the unity forums, and someone suggested placing an event at every keyframe, moving the transform to the required destination.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Camera Animated, but first frame is not where it should be.
« Reply #3 on: May 21, 2012, 06:32:17 PM »
Could anything else be controlling the camera? Another script? Physics?

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: Camera Animated, but first frame is not where it should be.
« Reply #4 on: May 21, 2012, 06:34:23 PM »
Maybe I didn't explain it very well. Unity is just drawing the information in between 2 keyframes. I don't want it to at all.

I have put the keyframes as close together as Unity allows, i.e. neighbouring frames. but it still draws the camera moving really fast between locations for a tiny amount of time.

I might try sampling the animation at a VERY high rate and see if it helps.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Camera Animated, but first frame is not where it should be.
« Reply #5 on: May 21, 2012, 07:03:04 PM »
Ahhh, now I understand - I took half a second more literally... :)

Most animation editors have a "step" keyframe type for this. In Unity I think you use "broken" - right click on the keyframe, select "broken", and make sure to get rid of any curve handle (drag it back to the keyframe).

That should create a discontinuous keyframe with no interpolation.