playMaker

Author Topic: possible bug with vector 3 lerp 2 action[SOLVED]  (Read 2640 times)

invayne

  • Full Member
  • ***
  • Posts: 105
possible bug with vector 3 lerp 2 action[SOLVED]
« on: February 22, 2015, 12:50:14 PM »
no idea why its doing this cause it didnt do it till i got the animations working but any time i use the vector 3 lerp 2 action it positions the player body way away from the actual position. ive tried setting it to .1 and 5 and i get the same results every time. and with out lerping my  movement is very jerky. is there anything that might be causing this? im working with ufps  and am using a animator controller with it. and im setting the position of the player body  which is the child of the parent to the parent object in order to get all rotations and positions in sync with each other but when i use the lerp it pushes the body away from the actual player position this only happens on the network view side not on the actual player character
« Last Edit: February 24, 2015, 07:46:47 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: possible bug with vector 3 lerp 2 action
« Reply #1 on: February 23, 2015, 01:12:00 AM »
Hi,

 it sounds like your animation is not "in place" and has keys that affects the root transform.

 Can you double check this?

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: possible bug with vector 3 lerp 2 action
« Reply #2 on: February 23, 2015, 11:00:37 AM »
yeah i already did a ton of checking basically whats happening is the animations plays fine and i got no actual animation set up. i have tested this with a idle and run animation and i get the same results. now it dosent affect the actual player character at all it works fine for client side but non client side it off sets the player like 20 feet from its original position. if i take the lerp off it works fine it only happens when i try to use the lerp. but with out the lerp i get stuttered movement and i need the lerp to smooth out the movement. now i have to use photon view on the parent object as well as the player body to get the 3rd person view to work correctly other wise the body dosent do anything. the body it self is getting the position of the parent object to set its position so it will rotate when the camera rotates. since the client cam is first person. both the rotation sync's and the position sync's are identical so that the body will move with the controller. as of now i took out the lerp but with it int here it goes all crazy and moves the bodymesh away from the player when shown over the network. itll rotate and what not but will only rotate in a manner like the pivot point is wrong  which it isnt . im using movement animset pro animations just the animations. 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: possible bug with vector 3 lerp 2 action
« Reply #3 on: February 24, 2015, 02:54:54 AM »
Hi

uhm, you seem to have a lot potential trouble, if you are using photon, you should check the example provided with PlayMaker port ( on the wiki) and see how I implemented the lerping, maybe this will help you find out what could go wrong.

 It could be that you slaved instance isn't totally switching off control to let the synch variables do their job. Or maybe there is a conflict between the various update times ( maybe you should try on late update).

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: possible bug with vector 3 lerp 2 action
« Reply #4 on: February 24, 2015, 06:08:20 AM »
tried that as well. didnt help. and the way im doing this is almost exactly like the demo except the lerp is messing things up....
« Last Edit: February 24, 2015, 06:12:26 AM by invayne »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: possible bug with vector 3 lerp 2 action
« Reply #5 on: February 24, 2015, 06:37:43 AM »
Hi,

 What I don't understand is that the demo is lerping, so I am not sure where and if the actual problem is the lerping, I think you have another piece of logic ( maybe the anim itself) that is corrupting the position of the gameobject.

you have the lerping on the slaved instance right? you don't lerp the position of the gameobject that IS the owner of this instance ( returning "true" using the action "isMine")

 Bye,

 Jean

invayne

  • Full Member
  • ***
  • Posts: 105
Re: possible bug with vector 3 lerp 2 action
« Reply #6 on: February 24, 2015, 07:14:57 AM »
i ripped the whole code apart and rebuilt it and the lerp is now working like its suppose to sorry for the trouble. and thanks for the info on this. and to answer your question i was lerping on the not mine just like in the demo

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: possible bug with vector 3 lerp 2 action
« Reply #7 on: February 24, 2015, 07:46:34 AM »
Hi,

 good! no worries, it's always important to share your issues, even if it turn out to be a design issue and not a bug, you can't know in advance... :)

So keep coming with your issues, this forum is here exactly for that.

 Bye,

 Jean