Forum rules - please read before posting.

Character Falls thru navmesh floor of scene 1 after coming back from scene2

I have a character go from a room into an elevator (from scene 1,) to scene 2, and when i go back to scene 1 ( with the player start now in the elevator) he just falls thru the floor. the elevator has navmesh and in scene 1 the character had no issue walking around the scene.

Also when we go back to scene 1 i would like the elevator doors to be open, but they are closed in the original instance of scene i need a remember component or something like that on the doors to remain open? ( at the end of scene 1 a timeline event played where they opened and remained open)


  • edited September 2023

    So you have an Elevator that's the Transition point between Scene 1 and 2.

    I'm not quite sure about the first Part, could you show how you have set it up, because i don't understand how you have a different Player Start in Scene 1 when going back, do you change the Player Start after the first Level Change?
    Are all Colliders correctly setup, or is the start point a bit too low maybe?

    For the second Part of the Question:
    Yes you should have a Remember Component on it to save changes. Take a look at Chapter 9.1.1 in the Manual "Saving Scene Objects".

    The Timeline probably plays once but hasn't done so in Scene 2.
    The easier way for you could be, to control the Elevator Animator with Variables e.g. an "IsElevatorOpen" Bool, and have it be open if it's true.
    You'd have to use Global Variables, so it's accessible across Scenes.

    You could also just have a different Elevator in Scene 2 where the Doors are open. It doesn't have to be the same elevator, if you are transitioning to another Scene anyway.

  • Check that the elevator has a collider on its floor. This may not be apparent during the Timeline, as if your character is moved with an Animation Track, they'll ignore the physics system and be positioned entirely based on the Timeline.

    To have the elevator appear different when you enter Scene 1 from Scene 2, create an OnStart cutscene in Scene 1 that uses the Scene: Check Action to check the previous scene. If it's Scene 2, you can use the Object: Animate Action to play an animation that opens the door - provided you've created one that's present (but not the default) in its Animator Controller.

  • And if i want hotspots that were active in scene 1 to not be active when we return, what is the most efficient way to do that? a variable check ?

  • You can attach the "remember Hotspot component" and use "Action: Hotspot Enable or disable".

  • edited September 2023

    It depends. If the Hotspot was disabled while in Scene 1 for the first time, attaching the Remember Hotspot component to the Hotspot will be enough to save its state and apply it upon re-entering.

    For details on AC's scene-saving system, see the Manual's "Saving scene objects" chapter.

    If you instead want to disable the Hotspot when you re-enter, create a new Cutscene that uses the Scene: Check Action to check if the previous scene was Scene 2. If so, run a Hotspot: Enable or disable Action to disable the Hotspot.

    To have this Cutscene run when the scene begins, either assign it in the Scene Manager's "On Start Cutscene" field, or attach the ActionList Starter component and check Run on scene start?.

  • I have used the cut scene for ON LOAD when coming back to the 1st scene from the second, and in that action list, i have a scene switch action at the very end, everything in the OnLoad cutscene/action list works but it doesnt change scenes at the end. any ideas?

  • edited October 2023

    What are your AC/Unity versions?

    Check your Console for related messages - does anything appear at that moment?

    The "OnLoad" Cutscene is reserved for initialising a scene's state when the scene is opened due to loading a save file, however. If it's running when you re-enter the scene, is it referenced elsewhere (e.g. the "ActionList Starter" component)?

    For Actions that you want to run when the player switches to it through natural gameplay, use "OnStart".

    If you'd like an extra set of eyes on things, share screenshots and I'll take a look.

  • i just updated to the most recent version, my version was a bit older. in you wanted a cutscene to go thru different locations, would that be possible on one timeline event? or how would you set that up?

    like if a character goes from one room, through a hallway, into another room ( 3 seperate scenes) what do you think the best way to execute that would be?

  • To create a cutscene that spans multiple scenes, you can use an ActionList asset - with Survive scene changes? checked in its Inspector. If this ActionList uses a Scene: Switch Action, it'll pause until the switch completes, and then resume.

    To rely on Timeline for such a cutscene, break it up into individual Timelines that each manager their own scene - e.g. MyCutscene_Room_Timeline, MyCutscene_Hallway_Timeline etc. You'd then have your ActionList asset call them with Engine: Control Timeline Actions after using the Scene: Switch Action to first open the correct scene.

  • Hello again ! Another question, i am making a demo game and i want my character to refuse to go into any of the buildings before going to the tavern first, is the easiest way to do this, to make a variable and then have each action list on every building check the variable before entering? or is there some kind of global way to do it once?

  • OOOOOH also! the hotspot on the buildings is stuck at the top portion of the building, where id like it to be more centered? ive adjusted where the hot spot box is but its still only showing near the top?

  • I was messing around with this general idea, but i noticed that when i was running the game on one window AND had youtube on another the performance dropped significantly, what would you suggest as a way to optimize a game? or are there ways to check performance within unity?

  • is the easiest way to do this, to make a variable and then have each action list on every building check the variable before entering? or is there some kind of global way to do it once?

    You could feasibly use a script to alter your Hotspots, but it's likely more trouble than its worth. A variable checked as part of each other building's interaction would be the way to go in my book.

    ive adjusted where the hot spot box is but its still only showing near the top?

    It looks like a case of your Hotspot colliders intersecting with another collider, blocking it from the mouse's raycast.

    If a Collider on the Default layer (which could be another Hotspot) is placed in between the camera and a Hotspot, then that Collider will block its interactability when using the mouse.

    what would you suggest as a way to optimize a game? or are there ways to check performance within unity?

    The AC Manual has a list of AC-specific optimisation tips in the "Performance and optimisation" chapter, but Unity's own site give a lot more general tips. To check performance within Unity, use the Profiler tool.

  • ok ! that worked!

    I have a timeline in one scene, just one animation that i have the timeline during a conversation, but for some reason when the scene loads the character is doing that drinking animation, instead of his usual idle animation. any ideas?

  • Does the Playable Director have "Play On Awake" checked?

  • That was it ! You're amazing !! Thank You !

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.