unity3d - unity 2D (look at) object disappears -


i have moving object want @ target it's moving towards, here code:

void update () {     transform.lookat( target.transform.position); } 

the problem object @ target while moving, disappears screen, it's there @ same :/

edit: since game in 2d view, object kinda turns sideways, when talking disappearing still there, happening turns , faces object it's looking at. hope makes things more clearer.

check sorting layer order of 2d object. if has order less order of other object disappear behind it. can check in detail link. https://unity3d.com/learn/tutorials/modules/beginner/2d/sorting-layers


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -