Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: blackant on February 21, 2019, 01:54:28 PM

Title: How ot set a sprite angle relative to 2 other sprites ?
Post by: blackant on February 21, 2019, 01:54:28 PM
Well, everything is in the title, i have some difficulties to find the right formule to get the desired result...

i tested the action get angle from 2 transform objects, but it doesn't works like espected with UI.
for now the angle is always = to 90
Title: Re: How ot set a sprite angle relative to 2 other sprites ?
Post by: djaydino on February 22, 2019, 12:44:43 AM
Hi.
maybe this can get you in the right direction :

https://answers.unity.com/questions/1038431/make-ui-compass-point-to-3d-object.html

in ecosystem you can search for actions by searching for parts of code.
Like for example "Mathf.Rad2Deg" or "Mathf.Atan2"
Title: Re: How ot set a sprite angle relative to 2 other sprites ?
Post by: blackant on February 22, 2019, 02:04:45 AM
thanks, got something near to solve my problem with this