- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
Reginaldo · Mar 30, 2012 at 07:02 AM ·
targetaugmented realityhud
target hud
hi,
i'm working in a game with Augmented Reality, like game ARDefender (see www.ardefender.com) and I got problem with the red dot (target) ...
how can I do my model/player (a 3d char in the middle of scene) always turns his direction to my red dot (target) ?
please, see that game i mentioned for reference for my first question.
Comment
Answer by fafase · Mar 30, 2012 at 07:05 AM
var target :Transform;
function update(){
transform.LookAt(target);
}
Attach this to your char. Drag the red dot object to the target slot in the inspector and your char should be looking at it at all time.