Forum rules - please read before posting.

Game jerks jerky movement in game view while running (after quit and re-launch unity)

edited July 2014 in Engine development
Hello,

I've recently struggled with this issue,

I have my own custom camera setup as the _Cameras _GameCameras, once my scene is all setup player this and that, it works like a charm.

All is good until the next day I launch Unity again and now the game play preview "jerks" the movement is jerky, but watching it in the scene view everything is 100% totally right, no jerky movements happening there for some reason just the game play preview starts jerking as if the "camera" is fighting for some odd reason,

If I disable my component (fun stuff to follow the player) on the camera, obviously the jerkiness disappears, however, if i turn it back on it re-appears,

i went one step further, i disabled the components of the camera and placed it under my character (while in running game play preview) now the camera literally changes z and x axis as the player moves but the camera view itself stays the same.

seems like there is a constant battle between my own custom camera and AC system?

my script to follow the player is fairly straight forward, no idea why this is happening and would really really appreciate the help to remove this bug.

I tried dragging and dropping down the default  camera again, nothing changes, the fact is nothing has changed on my camera since it worked and now besides a reboot. if I were to create a new scene (this is the 2nd time re-creating it all) it all works fine until restarted again...

Thanks 

Comments

  • You're asking for help with what's presumably a custom script, without any detail as to what that script does!

    The MainCamera is the only camera that should ever be active.  "_Camera" cameras are basically references for the MainCamera to latch on to - it'll copy the position / rotation / FOV etc of it's attachedCamera _Camera field.

    Disable your own camera component, and use the Camera: Switch Action to snap the MainCamera to it.  The MainCamera will snap differently according to what subclass of _Camera it is - so if you have trouble getting it to follow properly, try deriving your script from GameCamera, not _Camera.

  • Ah I see,

    I realize the problem was here: my custom camera had the "Camera" component active as well thus these issues were happening, however I failed to see how amazing your cameras are already.

    The only thing I'm unsure of how to use is the Animation Camera hopefully there is a tutorial somewhere or a video, I have a feeling it will come in handy for my game.


    To use all these "actions" for example if I have over 20 of them, can I simply create an empty object do the actions in it, and I can call upon it by stating Interact  without any parameters and it should run.

    AC won't have any issues if at the same time more than 1 "action" is being run (example 2 separate objects, 1 to move the player to a point and do something, 2 to play with the cameras around and other effects)

  • You can run as many ActionList in parallel as you like.  Use the Cutscene prefab (from the Scene Manger) to create ActionLists that run when you choose to.  You don't need to state Interact on them - just use the Engine: Run ActionList action to call another Cutscene, or change the "After running" option of any Action to "Run Cutscene.".

    With most Actions, however, you get an additional Pause until finished? option.  When left unchecked, the system will move onto the next Action while the previous one still runs.  Therefore, you can move and player, and the camera, at the same time.

    As for the Animation Camera, that can be used in two ways: 1) to play an animation whenever it is made active, and 2) follow it's target (usually the player) according to an animation.

    2) allows for cameras that act God Of War-style, if your familiar with that game.  Basically, it'll put itself at a set point on an animation curve, according to how far the Player is along a pre-determined Path.  See section 4.3 of the manual for more on this feature.
  • Thanks a lot for the info, I read the manual and I'm still un-sure how to make animations on the Camera, no idea how to reach #1 or #2 I will continue playing around to maybe figure it out because animated camera sounds like a fun option for my game. Hopefully i figure out how to implement it
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.