Quantcast
Channel: Answers by "Kleptomaniac"
Viewing all articles
Browse latest Browse all 90

Answer by Kleptomaniac

$
0
0
To determine the direction that your character is facing, try [Transform.forward][1]. To rotate an object based on the position of another gameObject, try [Transform.LookAt][2] like so: Transform.LookAt(crosshairGO.transform.position); Did that help? I'm not sure if that's what you wanted. Klep [1]: http://unity3d.com/support/documentation/ScriptReference/Transform-forward.html [2]: http://unity3d.com/support/documentation/ScriptReference/Transform.LookAt.html

Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>