playMaker

Author Topic: Look At and Move towards problems...[SOLVED]  (Read 2548 times)

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
    • View Profile
Look At and Move towards problems...[SOLVED]
« on: April 27, 2013, 02:43:22 PM »
Is there a way that when using "smooth look at" and "move towards" actions, once the task is accomplished the character does not go back to previous position or facing direction?

Also, I keep getting those errors when I use "Smooth Look at":
------------------
Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation(Vector3, Vector3)
HutongGames.PlayMaker.Actions.SmoothLookAt:DoSmoothLookAt() (at Assets/PlayMaker/Actions/SmoothLookAt.cs:114)
HutongGames.PlayMaker.Actions.SmoothLookAt:OnLateUpdate() (at Assets/PlayMaker/Actions/SmoothLookAt.cs:64)
HutongGames.PlayMaker.FsmState:OnLateUpdate()
HutongGames.PlayMaker.Fsm:LateUpdateState(FsmState)
HutongGames.PlayMaker.Fsm:LateUpdate()
PlayMakerFSM:LateUpdate()
-----------------
« Last Edit: February 17, 2015, 02:03:25 AM by jeanfabre »

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
    • View Profile
Re: Look At and Move towards problems...
« Reply #1 on: April 28, 2013, 06:10:07 AM »
I've made the errors go away by changing the SmoothLookAt.cs setting of
diff.sqrMagnitude to "> .001" instead of "> 0"

I still am not sure how can I disable the two scripts from going back to initial position after completing the task...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14213
  • Official Playmaker Support
    • View Profile
Re: Look At and Move towards problems...
« Reply #2 on: May 13, 2013, 02:47:04 AM »
Hi,

 Can you not exit the state and manual set the position then?

bye,

 Jean

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
    • View Profile
Re: Look At and Move towards problems...
« Reply #3 on: May 21, 2013, 04:03:02 PM »
Sorry for the long delay.

I am using the "move towards" and "look at" to control a character in the game that waits for, and responds to changes in target position. (Not controlled by the player). Right now, the character goes back to the original position once it reaches the target and the target doesn't move. I would rather have him stay there and wait for any position changes of the target...

Hmm... Maybe you are right. Maybe I could just tell the character to stay in place and wait for any changes of the target.

 

sebaslive

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
    • Frame Tale Studios
Re: Look At and Move towards problems...
« Reply #4 on: February 10, 2015, 12:53:38 PM »
I've made the errors go away by changing the SmoothLookAt.cs setting of
diff.sqrMagnitude to "> .001" instead of "> 0"

Thank you for this.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez