Forum rules - please read before posting.

PlayerStart rotation doesn't seem to work.

I have no local Player on the scene, instead I'm instantiating one from Settings. However I rotate my (default) PlayerStart prefab, the spawned Player always faces the same way. How to solve it? Thanks.

Comments

  • I'm getting this error too:


    Look rotation viewing vector is zero
    UnityEngine.Quaternion:LookRotation(Vector3, Vector3)
    AC.Char:GetTargetRotation() (at Assets/AdventureCreator/Scripts/Character/Char.cs:3558)
    AC.UltimateFPSIntegration:OnTeleport() (at Assets/AdventureCreator/Scripts/Static/UltimateFPSIntegration.cs:233)
    UnityEngine.Component:SendMessage(String, SendMessageOptions)
    AC.Char:Teleport(Vector3, Boolean) (at Assets/AdventureCreator/Scripts/Character/Char.cs:1313)
    AC.ActionPlayerSwitch:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionPlayerSwitch.cs:161)
    AC.<RunAction>c__Iterator2:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:342)
    UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:306)
    AC.ActionList:BeginActionList(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:274)
    AC.ActionList:Interact(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:185)
    AC.ActionList:Interact() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:154)
    AC.SceneSettings:RunCutsceneOnStart() (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:202)

  • Recreated, thanks for the report - I'll work on a fix.
  • Chris, PlayerStart rotation still doesn't work on my end. Player always faces the door no matter how I rotate the PlayerStart prefab.
    Using an UFPS Player, AC 1.62.3, Unity 2017.4.1.
  • What about the error message?

    Please also share more detail about your UFPS Player, as well as UFPS version.  Does this issue occur when using the downloadable UFPS Player prefabs?
  • Please also share the Action(s) that you call when the spawn occurs.  If you're using the Player: Switch Action to spawn the player, what are the conditions under which the spawn occurs (previous player, etc)?
  • I'm using AC's downloadable UFPS AdvancedPlayer.
    UFPS 1.7.2.
    I don't use Player: Switch, single player prefab only. 

    There are no error messages.
    But the error occurs on one scene, and not on the other.

    To make sure, I used OnStart Player: Constrain on both, enabling all movements. 
    But rotation's still off on one of my scenes. I'll do further tests.
  • Got it, it was pretty trivial: AC Motion Control was set to manual on my 'offending' Player. Setting it to Just Turning does the trick. 
    Again, thanks for the support!
  • The previous "solution" above me didn't really solve the issue, I just thought it did. I suppose it's one of the many UFPS scripts that interfere.
    It now seems that with a local UFPS AdvancedPlayer, I need to manually pre-rotate the prefab because it won't respond to PlayerStart rotation.

    Using AC 1.62.5, Unity 2017.4.2 by the way.
  • And still UFPS 1.7.2?

    Is this the default AdvancedPlayer in the UFPS folder, or a modified one?  How about the modified one from AC's Downloads page?  Neither appear to give me any trouble when used locally so far as the starting rotation appear.

    If you suspect it's down to a UFPS component, try removing them one-by-one to find the offender.
  • It's the original AdvancedPlayer provided by you, but in my case it's heavy with new components: scripts from 3rd party packages. It's a local issue then, I'll try my best.
  • @ ChrisIceBox I have the same problem using Unity 2019.4.17f1. The rotation does not work but the position does. No error on the console. Using the latest AC version.

  • Curiously the Tinpot character is working fine. But using the previous Character (CC3) does not work. The point and click does not work neither but works fine with Tinpot.

  • After more tests my CC3 Character is working fine now. 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.