Forum rules - please read before posting.

Maintain Character Direction and Speed Between Scenes (2D Direct Control)

edited October 2018 in Technical Q&A
I know there's a tutorial for switching cameras within a scene (3D) and keeping the player's direction aligned with the previous perspective until a new direction is chosen (avoid backing right back out of door you came in, etc.) - But I'm a bit lost when trying to use direct controls (via controller) in a 2D game that utilizes different scenes to achieve the same.

Today, two things happen.

1) Each scene appears to reset the joystick, meaning players need to first let it come back to center, then push forward again in desired direction  - Is there a way to apply this input magnitude immediately onto the instance of the player in the new scene on start? 

2) Player orientation is undefined (or undefinable?) from the controller's input. So if the point of view of the new scene is from a new angle, I'd need to define what the new 'left' is, etc. (for the purpose of continuing prior scene's direction only) - Any thoughts on how to do that? 



  • edited October 2018
    So far as I can tell, #1 is a Unity issue.  Unless you override with a delegate (see the Manual's "Remapping inputs" chapter), AC relies on the standard Unity Input.GetAxis method to read input values.  This value is itself set to zero after changing scene - the AC character not moving is a knock-on effect.

    I don't understand #2 - can you share screenshots to illustrate?  If the game is in 2D then I can't see how the angle comes into play, since the camera's always fixed in the same direction.  Pushing left should always result in the character moving screen-left.
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.