playMaker

Author Topic: Get Position Returning incorrect values  (Read 1359 times)

apower

  • Playmaker Newbie
  • *
  • Posts: 1
Get Position Returning incorrect values
« on: November 27, 2019, 01:51:23 PM »
Hi there! I've looked through the forum a few times before posting about this particular issue I'm having, so hopefully it hasn't been answered previously.

I want to get the position of an object and store the results in a float variables for X and Y. The problem is that the Position that I'm getting does not match the actual position of the object, as shown in the attached screenshot. I'm very confused, as the vector that it's generating has the correct X and Y, but when storing this value in the X and Y floats, the position is completely incorrect. Any idea of what is causing this?

https://imgur.com/a/wpIuvjl

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Position Returning incorrect values
« Reply #1 on: December 27, 2019, 05:14:00 AM »
Hi,

 with imgur, you can embedd the image easily in your post,

right click on the imgur image itself, copy the image url, and in the post, paste it using the image tag ( from the toolbox of the message)


Code: [Select]
[img]https://i.imgur.com/Gk6t5xX.png[/img]


now, onto the problem itself

you get the position once, when you enter that state, and so if the object has moved, then of course the values differs.

Could it be also a problem of hierarchy and local/global position mess?

Bye,

 Jean