[SOLVED] BUG - View type yaw/pitch min/max limits do not work when aiming or using/firing in third person perspective

FastSkillTeam

Active member
As title describes, min/max yaw limits are not taken into account when aiming or firing in third person perspective. The RotateTowardsLookSource setting takes over and the character can continue rotating. Works fine in first person perspective.
 
In the demo scene I set the pitch of the Third Person Adventure View Type to 5/-5 and it worked while aiming. Maybe you have a state overriding these fields?
 
Definitely no states overriding, it's the yaw giving me issues, player is on back of quad in fixed position. Player yaw limit breaks when aiming in third person adventure view, allowing the camera and body the rotate 360 degrees. Limit works if rotate towards look source is false, but then the body doesn't rotate at all.
 
Ah, it's the yaw? That actually makes sense - the ability will override the rotation in that case.
 
On the Aim ability there is an option that allows you to specify if you want to have the ability rotate the character to the target.
 
I have already tried this...
if (adv.Yaw > yl || adv.Yaw < -yl)
GetAbility<Aim>().RotateTowardsLookSourceTarget = false;
else GetAbility<Aim>().RotateTowardsLookSourceTarget = true;

Makes logical sense? Doesn't work...

Although, it doesn't work, I tried this

if (adv.Yaw > yl || adv.Yaw > -yl)
GetAbility<Aim>().RotateTowardsLookSourceTarget = false;
else GetAbility<Aim>().RotateTowardsLookSourceTarget = true;

Funny that makes no logical sense, yet it works to one side but not the other, the other goes way past then glitches back to where it should actually be at its limit.
I'm getting closer, but not close enough.
As you can imagine I want the character to rotate until its limit. Its just the aim that kills it unfortunately, everything else is working perfectly
 
I think I have a workaround, will try it tonight, I will modify player yaw speed to 0, or the modify the horizontal input, will let you know how it turns out
 
I found a simple solution, EventHandler.ExecuteEvent(m_GameObject, "OnCharacterForceIndependentLook", true);
Problem solved :)
 
Top