playMaker

Author Topic: Set position not reaching moving target.  (Read 839 times)

Stain Corb

  • Junior Playmaker
  • **
  • Posts: 69
Set position not reaching moving target.
« on: March 10, 2020, 10:45:00 AM »
Hi again.

So I am setting my character to use FinalIk, but before I do that I am working with with my Slave game object and targets.

If you see in the video I have a Blue Box that is supposed to reach a red box, but it never reaches it since the action "SetPosition" wont update the target box every frame, it will just get the last location it saw it and move there, but once it reaches this point the target is already some ware else.

I am having the same problem with arms. My plan is to keep the IKs on all the time. So I have my Idle targets, and my Aiming targets so I can change when I am aiming.Hiting. etc... then back to idle targets when not.

1-So the question is basically what action should I use that can move and actually reach the target correctly.?

2-Will this action work with y position displacement to fake feet movement going up and down.?

3-BTW I need arms to work correctly, character is FP so I can figure something else with the legs.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set position not reaching moving target.
« Reply #1 on: March 11, 2020, 02:41:13 AM »
Hi,

 the action SetPosition will set the position you feed it with, so it's likely prior that you have a logical issue.

SetPosition has an "Everyframe" option, so you can update that everyframe indeed.

How do you compute the reaching position?

I would use MoveTowards, and set the distance limit to 0.  Have you tried that?

To fake y movement, have a child from the moving object on the ground, that you animate up and down. at the start of the step up get the distance to the target, and normalize that to 1, you can then use a curve to sample the height, the curve would be normalize too, so that you can use a multiplier for the final height, when walking or running for example. Your IK target will be that child.


Bye,

 Jean

Stain Corb

  • Junior Playmaker
  • **
  • Posts: 69
Re: Set position not reaching moving target.
« Reply #2 on: March 11, 2020, 12:34:08 PM »
MoveTowardsAdvanced seams to work quite good, thanks a lot I still need to check the legs, but first I will make sure arms work out fine.
« Last Edit: March 15, 2020, 01:37:54 PM by Stain Corb »