playMaker

Author Topic: Translate Movement unexpected behaviour [SOLVED]  (Read 2922 times)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Translate Movement unexpected behaviour [SOLVED]
« on: January 08, 2017, 10:56:14 AM »
Hello,

i'm using a quite simple FSM for translating the object depending on its position. I get the objects position, and i compare it to float values, which are thresholds that determine the movement direction.



As you can see, there are four possible outcomes:

1. If the object is instantiated on the upper portion of the screen, it translates down
2. If the object is instantiated on the lower portion of the screen, it translates up
3. If the object is instantiated on the left portion of the screen, it translates right
4. If the object is instantiated on the right portion of the screen, it translates left

3 and 4 work great, but when it instantiates up or down, the Y axis movement is ok, but it also applies the same amount of translation to the negative X axis, so the object move down/left when it is instantiated in the upper part of the screen, and up/left when it's instantiated in the lower part of the screen.

Any ideas what's going on? No translation is being set until the final states.
« Last Edit: January 11, 2017, 05:27:47 AM by krmko »
Available for Playmaker work

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Translate Movement unexpected behaviour
« Reply #1 on: January 08, 2017, 11:04:08 AM »
I manually set nonaltered transition values to "0" instead of "none" and it works ok. I think this is a bug.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Translate Movement unexpected behaviour
« Reply #2 on: January 09, 2017, 02:36:29 AM »
Hi,

 can you make a screenshot of that action with "nonAltered" property? I am not sure I understand where you are.

 Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Translate Movement unexpected behaviour
« Reply #3 on: January 09, 2017, 05:54:55 PM »
Here it is



When i set X to "none" instead of "0", it begins behaving like described.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Translate Movement unexpected behaviour
« Reply #4 on: January 10, 2017, 02:07:29 AM »
Hi,

Is it a RigidBody you are trying to move?

Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Translate Movement unexpected behaviour
« Reply #5 on: January 10, 2017, 02:48:41 AM »
Hi Jean,

yes, Rigidbody 2D.
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Translate Movement unexpected behaviour
« Reply #6 on: January 11, 2017, 04:19:41 AM »
Hi,

 Then , it's likely a corruption between the transform and the rigidBody.

 Can you try with non rigidbodies?

Can you also try to use MovePosition, which is how it's intended to be done with Unity.



 Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Translate Movement unexpected behaviour
« Reply #7 on: January 11, 2017, 05:23:52 AM »
Hello Jean,

i haven't tried non rigidbodies, i'll test it out and let you know.

Move Position is, at least for me, too much complication for such a game, i'd have to save coordinates as variables, than add float just to move the object, translate works much simpler for linear movement.

Thanks!
Available for Playmaker work