playMaker

Author Topic: Get Position -> World to Screen -> Set Position = Glitch (Video)  (Read 212 times)

miguelfanclub

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Get Position -> World to Screen -> Set Position = Glitch (Video)
« on: September 18, 2017, 12:43:13 PM »
Im getting this annoying glitch trying to overlay world screen icons on top of my prefabs.
Is there a way to overcome this?

https://youtu.be/_xau3N3c0Z8

Or a better way to achieve it

Thanks
« Last Edit: September 18, 2017, 12:48:20 PM by miguelfanclub »

Ateam

  • Junior Playmaker
  • **
  • Posts: 60
    • View Profile
Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
« Reply #1 on: September 18, 2017, 06:34:35 PM »
What are you doing inside that fsm? I mean what actions are you using for that?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
« Reply #2 on: September 18, 2017, 11:45:44 PM »
Hi,

 at what time exactly is the glitch? I am not sure I understand what's wrong.

 Check out the uGuiTextFollowGameObject sample on the Ecosystem, it shows you how to do this get position, world to screen and set position.

 Bye,

 Jean

miguelfanclub

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
« Reply #3 on: September 19, 2017, 02:44:02 AM »
@jean

Im doing exactly the  uGuiTextFollowGameObject code. The only difference is that im calling those actions ONLY when I start firing my hitted object actions via global event. If they are runing on START i dont have the glitch.

Problem is that I shouldnt have hundreds of objects with hidden icons executing their world position all the time every frame.

miguelfanclub

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
« Reply #4 on: September 19, 2017, 06:00:06 AM »
@Jan

From sec 5 you can see. The icon doenst start where it supposed to do. You can see for a few frames out of its original position and after that, it goes where it should.

Here is a screenshot of my FSM:

https://puu.sh/xDwVI/d1565a7ce0.png
« Last Edit: September 19, 2017, 06:07:28 AM by miguelfanclub »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
« Reply #5 on: September 20, 2017, 01:38:24 AM »
Hi,

 it's likely that your position is wrong, not your actual logic to match that position.

I bet your raycasting is the source of the issue, maybe it casts on an object you don't want.

 Bye,

 Jean