Camera pan not working/ updating?

Hello, I have a rather odd problem. I cannot seem to get my camera to follow my player actor. I tried with the default "camera follow" pre-made behavior. It did not work (all of the following behaviors were indeed attached to my actor). I then made my own very simple behavior "When updating { center camera on self }" because there is so little that can go wrong with a one line long behavior, I figured I should be able to troubleshoot it easy. As it happens it still didn't work. So I don't think the behavior is my problem. I don't know if there is an actor setting that is causing this (I looked but didn't see anything). My scene is rather gigantic, so there is scrolling room, and It contains only tiles and a singular player actor. I am spawning my player actor rather high and hoping the camera will pan as the player actor falls to the ground. I do not have any other behaviors active in the scene or player actor.

Any input would be helpful.
Thanks in advance!

stefan

  • *
  • Posts: 2263
Make sure your actor that the camera isnt colliding with anything.

hrm. I changed the player actor default animation to be a sensor, and removed all the tiles from the scene. no dice. I didn't realize the camera could get caught on things.

« Last Edit: August 04, 2017, 11:56:49 am by DrunkenShakespeare »

letmethink

  • *
  • Posts: 2545
Is your player set to always be active? Perhaps its events aren't activating because it starts off screen.
~Letmethink

I set my player to be active with the same result. An interesting thing though, if the player starts on the screen (but offset from the center) or slightly off screen to the left or right of the camera, the camera X value centers on the player actor. The Y value doesn't change, and the X value doesn't focus on the player actor (even when set to be always active) if it is any more than slightly off screen. :/

Additionally, If I create a "new game", make an actor with the "camera follow" default behavior, this same thing happens in any scene I make. It should be noted I have no movement logic (besides gravity) attached to the player actor, meaning I have not tried moving it through keypress command and seeing if the camera will follow then. I don't think it should change anything, and I want the camera to be able to follow my player actor right from spawn. The player actor is also being manually placed in the scene, rather than procedurally generated.

I also made a camera behavior for the scene (for science, made just now). "when updating {set camera X value to "Delta" (a number variable adding up every act) and Y value to "Negative "Delta"'}" This did not change the position of the camera at all. I tried it with different combinations of the the negative values just to be sure I wasn't pushing the camera in a direction that it couldn't go any further into. Funny thing though, if I manually enter values into the "X value" and "Y value" (such as 2000, -2500), the camera moves to those coordinates.