#look at

1 messages · Page 1 of 1 (latest)

lapis steppe
#

simple look at works

#

just need some configuration in the scene

#

if you have quad

#

create empty parent and set child local rotation y 180

#

quadParent.LookAt(cube);

#

if you have some other object then quad

#

jsut rotate it more and you will find proper configuration

vague horizon
#

ok, it worked!

#

just i small tweak

#

its a little tilted

#

how do i fix that?

#

i suppose its the Z rotation

lapis steppe
#

there can be many reasons why it titlted, easyest solution is rotate child more untill you reach desired, best solution is show me tarsform component of that 3 object (cube, quad parent and quad) and them in the hierarcy

vague horizon
#

ok, when im at the left side of the sprite, it tilts like this

#

and at the right

#

here, i have with red the sprite and with yellow the camera

#

the child rotation is at 0, 180, 0

lapis steppe
#

and cylinders localposition is not 0,0,0

vague horizon
#

i was actually making it look at the player camera

#

located at 0, 0.55, 0

lapis steppe
#

and it is watching to taht camera

#

cosue camera and player world position is not the same

#

quad watches camera and little bit tilted to the player itself

vague horizon
#

cant i just lock the UI Z rotation?

#

i just noticed that its not actually looking at the player

#

its a little bit to the side

lapis steppe
#

it became really hard for me to understand situation, if youa re comfortable with call i prefare that, if not than i need more explenation what ui are you talking about?

vague horizon
#

i actually prefer to call also