playMaker

Author Topic: Character Controller (FPS) : keeping rotation after Smooth Look At  (Read 869 times)

capodoglio

  • Playmaker Newbie
  • *
  • Posts: 3
Hello Everyone,

I'm struggling with this specific topic:

I've a a player controller with the Main Camera parented to it:
 
- Player Controller (FPS)
- - - Camera

At some point I need the player (A) to look at another object (Object B) for some seconds, and it works just fine by using:

Smooth Look At
Wait (desired seconds)

It just works as expected, BUT whenever the Wait action is completed or the the Smooth Look At action is done and the player SNAPS BACK looking at its original direction before the Smooth Look At FSM was activated.

Everything I'd wish to achieve is to KEEP THAT DIRECTION (looking at Object B) after the Look At action is completed.

I do see what's happening here (maybe? I do know very very little-to-nothing about scripting) but I guess that the FPS controller overrides whatever the Smooth Look At action is doing, so once its done, it rolls back to what the script says to.

Any advice on how to keep the desired rotation of the player after the Look At Action?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Controller (FPS) : keeping rotation after Smooth Look At
« Reply #1 on: December 16, 2019, 02:39:01 AM »
Hi,

 yeah, that one is going to be tricky unless you create your own fps controller where you can override the values to make it turn programmatically...

try this:

Make another dummy level between your fps controller and your character visuals, you can then have the intermediate dummy to have your visuals to smooth look at a target without touching the fps controller itself, which anyway turns relative to itself, so you should be able to achieve this.

Bye,

 Jean


capodoglio

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Character Controller (FPS) : keeping rotation after Smooth Look At
« Reply #2 on: December 17, 2019, 06:02:23 PM »
Hi Jean,

Thanks for the advice!
I'll try to fix it the way you suggested :)