Camera Stuttering Problem

KGBlag

  • Posts: 2
I've set the camera to track the center of the player but it seems to have trouble tracking the player making the whole scene stutter as the camera pans to track the player. When the camera isn't moving the player itself is moving as intended so it has to be a tracking issue. I'd report this as a bug but I've seen other games negate this even in flash so I'm curious as to what I'm doing wrong. ???

« Last Edit: October 11, 2018, 07:15:17 pm by KGBlag »

Luyren

  • *
  • Posts: 1499
You'll have to post your code so we can help you. Alternatively, you could use the built-in Camera Follow behavior, that could do the trick.
Working.

KGBlag

  • Posts: 2
Ok, I added the built-in camera and it still didn't work until I turned on pixel-snap which up until now didn't do anything to help. Now it works, the stuttering has stopped. A little disappointed that I had to use the built-in code, I was trying to do everything from scratch but all well.

Thanks for the help!

Still a bit confused as to why I couldn't get it working up til now though. I'll post the old code if anyone could tell me what I was doing wrong. :p
   

« Last Edit: October 11, 2018, 08:52:33 pm by KGBlag »

Luyren

  • *
  • Posts: 1499
Your old code is ok, so it could either be multiple actors with fighting for control over the camera, or your actor could have an animation with a different size while moving, changing its center and making the screen stutter. I'm just guessing, is hard to tell without more info on your setup. At least you got it working.
Working.