Forum rules - please read before posting.

Error with Character - Face Direction ... Right

edited July 2019 in Technical Q&A

I am making a point a click game, the character is set to face or turn in 90 degree directions.

Sometimes this is done with using Is Instant...

If I set the player character to face UP – it faces 0 degrees
If I set the player character to face DOWN – it faces 180 degrees
If I set the player character to face LEFT – it faces 90 degrees

But...

If I set the player character to face RIGHT – it faces wildly different angles, though often favouring around 165 + or – 30 degrees.

I have tried using Affect Player ticked and Character to Turn set to main player.

I have checked my character has not been flipped. I have tried using TinPot and get the same result.

I am using Adventure Creator V1.68.2 and Unity 2019.1.0f2

:'(

I'll do some more tests but I've been playing with this for days.

Comments

  • edited July 2019

    This is a 3D game? What's the MainCamera rotation when this occurs?

    How are you getting your degree value? From an Animator parameter? If so, is it only the parameter that's affected, or the character's actual rotation? Please share screenshots to detail more clearly what's going on.

  • Yes, this is a 3D game. My main camera is looking from a first person perspective. (though this happens in 3rd person also) The degrees are those of the Unity grid, as taken from the Unity Inspector from either Main Camera, the Camera on the character when 1st person, or the character object itself, they all report the same angle.

    I have found a temp work around - rather than using Character – Face Direction – Right – Instant, I have found after attaching the Moveable script, I can use Object Transform – Rotate to 90 in world space, using 0.1 transition time to smudge over the Face Direction glitch.

  • edited July 2019

    The Action isn't intended to be used in first-person, since the camera is assumed to be independent from the player. I shall look into it, however.

    You may be interested in the Movement template: Nodes package on the Downloads page, which includes an example of first-person with arrow-button controls.

  • Updated with AC Version 1.68.3 - Character > Face Direction is now less consistent than before. :'(

    To perform any 90 degree turn Left, for example, I must always use Character > Face Direction - Left rather than I used to be able to use Character > Face Direction Left, Right, Up or Down.

    Does Character > Face Direction not read an angle of degree from Unity and instead get an degree from the Characters direction POV?

    Sometimes the Character > Face Direction completes a 90 degree turn, other times it falls short, and so after progressive turns my character is no longer facing Up Down, Left or Right (0,90,180,270(-90)) but stands at a variety of angles.

    I have tried this in 3rd person and also in 1st. I have used TinPot and my Character rig to test but have the same results. :'(

    I might have to fall back to trying - Object Transform > Rotate to (angle of degree) for all interactions.

  • edited July 2019

    The direction is relative to the camera - not the player. I will add an option to allow for character-relative turning.

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.