playMaker

Author Topic: Non lagging set position  (Read 1550 times)

Deepee

  • Playmaker Newbie
  • *
  • Posts: 4
Non lagging set position
« on: September 11, 2014, 05:31:19 PM »
Hello, i am instatiating a weapon object to a spawn point that is parented to
a mecanim hand bone. then on the weapon object i have a set position with every frame checked, so that the weapon object then follows the spawn point .
but when the avatar is animated i.e walking or fighting , there is a lag in the weapon position, and i want it to be stuck to the spawn point position rather than trying to catch up .
it happens on fast movements, i understand that a prefab can't be parented to another prefab at run time, but is there a work around that is like that ?

thanks for reading :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Non lagging set position
« Reply #1 on: September 12, 2014, 01:38:15 AM »
Hi,

 you need to work with LateUpdate which the default "set position" doesn't to, so that's why you get the lag.

 I have created a series of "Advanced" actions to solve this, basically you need to replace the whole process with "advanced" actions so that you get the position of the hand on late update AND set the position of the weapon on late updated too.

 to get these actions, search the forum or better use the Ecosystem, you'll get them straight away in your project without fuss.


 Bye,

 Jean

Deepee

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Non lagging set position
« Reply #2 on: September 14, 2014, 07:23:00 PM »
cheers , ill try that out.