Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: miguelfanclub on September 18, 2017, 03:43:13 PM

Title: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: miguelfanclub on September 18, 2017, 03: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 (https://youtu.be/_xau3N3c0Z8)

Or a better way to achieve it

Thanks
Title: Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: Ateam on September 18, 2017, 09:34:35 PM
What are you doing inside that fsm? I mean what actions are you using for that?
Title: Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: jeanfabre on September 19, 2017, 02:45:44 AM
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
Title: Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: miguelfanclub on September 19, 2017, 05: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.
Title: Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: miguelfanclub on September 19, 2017, 09: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 (https://puu.sh/xDwVI/d1565a7ce0.png)
Title: Re: Get Position -> World to Screen -> Set Position = Glitch (Video)
Post by: jeanfabre on September 20, 2017, 04: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