Forum rules - please read before posting.

Walk on ceiling for First Person movement (a.k.a. change the Player prefab's rotational axis)

Hi, I'm working on a first person game and I'm wondering if anyone knows how I could flip the Player prefab to make it look like they are walking on the ceiling. My Movement method is set to First Person and my Input Method is Mouse and Keyboard. In my Player prefab I can check Ignore Gravity and can place the player on the ceiling just fine. In the Movement settings on the Player script I can also uncheck Turn root object in 3D and when I play the game the player will be oriented the way I want with their feet on the ceiling. However, I can only look up and down, not side to side. If I check Turn root object in 3D and play the game I can turn side to side fine, but the player's feet no longer touch the ceiling and instead is oriented like they are on the ground. I'm guessing something is running on update that makes the player's rotation X and Z rotational axis always 0.

Is there a way I can change the X or Z rotational axis on the Player prefab to always be 180 and also be able to look side to side using the Turn root object in 3D option?

I'm using AC 1.75.2 and on Unity 2021.3.

Thanks

Comments

  • edited June 2022

    Having a custom rotation axis for your Player motion is a complex topic - best handled by a dedicated motion controller asset that is specially designed for it.

    It would then be a case of connecting it with AC via a bridge script - see this tutorial and the Manual's "Custom motion controllers" chapter.

    A selection of integration scripts can be found on the AC wiki here, but I would recommend first finding the asset/script that gives you the behaviour you're looking to have - in a fresh project - and then see about having it integrated with AC.

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.