Forum rules - please read before posting.

Player falling through the world.


This is of an old build from before I tried to integrate Top-down Engine

Hi everyone, so I'm trying to create a game within a game, using Adventure Creator as the 3D environment. I wanted to use the More Mountains Top-Down engine for the mini-game because it's a very good asset. However, when I finally managed to get it to load into the project without throwing a compiler error it made the first-person player fall through the floor. I was wondering if anyone had any experience with this or knew any idea of why this might be happening. When I constrained the character so it couldn't move on the Y-axis I was able to move around again but... I had planned to have more interaction in the 3D space so I need to find a proper fix for this.

Comments

  • At what point does the player fall? At the start or the end of the minigame? Try viewing them in the Scene window at runtime to see what's happening - are their collider settings changing, or being teleported somehow? How are you disabling / re-enabling AC when starting/ending the minigame?

    When you say you're constraining the player, you mean with their Rigidbody's Y Position? If this works, it may just be a case of checking/unchecking this dynamically through script at these times. You can access the Player's Rigidbody constraints with:

    AC.KickStarter.player.GetComponent <Rigidbody>().constraints
    
  • Hi, thanks for responding, I realize I was a bit vague in my description before. The player starts falling immediately when the scene begins and it happens both in the main first-person scene and in the 2D demo.

    I actually do not disable or re-enable AC during the minigame. I want it to run continuously so the player can back out while the game is still running and consult things like game manuals, printed world maps, and notes they've made.

    About Constraining the player, yes, I mean by clicking the constraint checkbox for the Y-axis in the rigid body. This isn't really a solution for me as it means the player won't be able to walk up inclines without a scene transition. Someone on the Discord for the Top-Down Engine just suggested that I check out the collision matrix and layers. I'm going to do that now.

  • So the above gif is more about what you want, than the actual situation?

    I'm not too familiar with Top-down Engine, but I can't imagine it's making changes to AC's Player character directly - though if it's affecting the collision matrices then this knock-on effect could happen.

    Do know it's possible to replace an AC character's Rigidbody/Capsule Collider with a Character Controller - though that too should be affected by Unity's Physics Settings.

  • edited September 2020

    "So the above gif is more about what you want, than the actual situation?"
    Yes, the game on the screen is a prototype I created for testing purposes. I had planned on using the top-down engine for the game but I guess it didn't occur to me that there would be such a conflict. Probably silly of me but there it is.

    If I don't solve this soon I'm just going to bite the bullet and write my own top-down engine. As I want my game to be an anthology of sorts and I quite the type of framework AC allows me to have. Strangely enough, when the camera transitions from the walking player to the stationary desk view things seem to work fine.

  • The player starts falling immediately when the scene begins and it happens both in the main first-person scene and in the 2D demo.

    A first-person Player relies on a 3D collider to act as the floor, which the 2D Demo scene will not have. Testing in the 3D Demo scene would be the more appropriate comparison.

    AC relies on objects being placed on the Default layer to be interactive, but the Player and floor objects have no such requirements. If Top-Down Engine is somehow affecting this layer's collision settings, you may get by with placing them on a new layer type.

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.