Forum rules - please read before posting.

Player on different Scenes 2.5D with 2 different scale due to camera

How the prefab in Scene Settings ? we cannot change player prefab in scene settings
So when we change scene . if the player does not have the same scale than the previous one?
Do we need to change the scale of the palyer at OnStart of the new scene
What is the best way . and what do you suggest?

Comments

  • I don't understand the question, but if you need to use two different Player prefabs, you have two options:
    1. Set your Player switching in the Settings Manager to Allow, and then define multiple prefabs there (and use the Player: Switch Action mid-game to switch Player)
    2. Simply create a new Player prefab and place him in the scene you want him to be in when the game is not running.  When the player enters that scene, this new prefab will be used as the Player for the duration.  This is a good option if you only need a new Player for a specific scene.
  • What I mean i have two scenes one in a room and one in the street (Note everything in 2.5D) and all images made by an artist in 2D in photo shop

    I have a Payer in a room with a specific scale in transform
    I put the player in Ressources Player
    The Ac Game Editor (settings) use in Character Settings that prefab: Player
    The room scene is fine.

    If i switch  to street scene the player is smaller. Should I use on OnStart of the street scene:
    Character Change Rendering and Character scale to new value and adjust the cam and field of view

    The other Option is to keep only on scene with differents cameras  as in your tuto:

    What is the best?
  • The best option would be to simply adjust the FOV or position of your camera.  Is that not possible?
  • yes i have to adjust the FOV and game position of the camera
    My game is Point and Click
    I Think the best way is to make differents scenes (my game may have about 30...) Rather one scene like your Tuto

    I will use different prefabs for the player: PlayerRoom and Player Street for my two scenes
    Allow Player Switching in settings
    and on OnStart of the scene make Action Type: Player Switch

    Is that Correct way?


  • No need to use player switching if each Player prefab is limited to one scene.  If you have a Player prefab present in the scene when the game is not running, it'll override the default one that you have in the Settings Manager for that scene.
  • Instead of starting a new thread, I'd like to extend this discussion.

    I just finished the 2.5D tutorial on your YouTube channel. I really liked the idea of using real world photo created environment, it's very cool.

    However, the issues of scale appear to be very tricky to deal with.

    In your tutor, you built a four location scene. Looking closer, it has some serious scale issues, which worry me as to the viability of this approach.

    Because you use four cameras and guesswork geometry (eye balled), keeping the Player at the proper scale will be/is very difficult.

    Looking at the tutor and using your values, this is pretty apparent.

    Unless you nail the geometry scale and the camera FOV, they will never match without a tremendous amount of eyeball work.

    In the 2D system you have the ability to adjust the scaling depth of your sprites. This make eyeballing very possible and pretty easy.

    In the 2.5D system there is no such tool to scale the 3D figure based on the perceived depth in the scene. You have to totally match the camera to the set geometry and that is no easy task.

    Is there any possibility to get the ability to re-scale the model at the Camera Switch events to help us fake the depth and perspective issues of matching the background cameras?

    Other wise I think I would have to make each Camera Switch a separate scene in a situation were there is a great deal of Z depth in the setup between cameras (as in your tutor going up steps and then moving towards doors, where scale does not match).

    Thanks,
    David
  • Thanks for the comments David.  Indeed the eyeballing aspect of the tutorial wasn't ideal - however, bear in mind that most (if not all) 2.5D games rely on 3D pre-rendered backgrounds, rather than photographs.

    When you have the background scene lit and rendered in an external 3D tool, you have the camera values available to transfer into Unity - giving you a 1:1 accurate representation.  Whether the 2.5D tutorial used photographs or renders, without the source files + same 3D tool, eyeballing was always going to be necessary to follow along.

    Re-scaling the character in 3D has a knock-on effect for things like speed, gravity, etc., and is more trouble than it's worth in my opinion - and the intended benefit of "2.5D" is that it shouldn't require such trickery to get realistic behaviour.  However, you can of course keep each camera in a separate scene if you prefer.

    Also know that, if you really need to change the scale of a character, you can write a custom Action to do this.  The following C# command would set the player's scale to (0.5, 0.5, 0.5):

    AC.KickStarter.player.transform.scale = Vector3.one * 0.5f;

    You could place that code in a custom Action's Run() function and use it at the same time as your Camera: Switch.  Here is a tutorial on writing custom Actions, which also explains how you could extend it to allow yourself to set the scale each time it's run within it's UI.
  • Hi Chris,

    Hey thanks for the quick reply to my question.  I'm used to doing this type of stuff with the eyeball method before 3D tracking got so good. I think i'll play around with the camera placement in the 3D set with a copy of the model in the scene to help get the depth issues solved while doing the setup.

    Thanks,
    David
  • Is not the exact same issue but is related to this so you might be able to help me. I'm working on a 2.5D game also and I want to do a scrolling background, the player walks through a long corridor and the camera will have to follow him and the background moves, so the current setting for the tutorial about 2.5d camera settings will not work and I couldn't find any other information related. 
    I think I know how to do this from unity animating the camera and not using the background component but a textured plane. But I think it's kind of a hack I was wondering if the engine has a tool for this situation that works better.  Thanks!

  • edited May 2016
    2.5D cameras are more of a convenience than anything, because they allow you to easily map a background to a camera.  However, the caveat is that the background is fixed, and cannot scroll.

    You can, however make use of regular 3D cameras as part of your 2.5D game when necessary.  It won't be listed in your Scene Manager, but you can drag it in from the Assets folder under Adventure Creator -> Prefabs -> Cameras -> GameCamera.  You can then create a camera that scrolls, but you will need to make the background a physical sprite in your scene - just be sure to set the camera's Projection to Orthographic.
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.