Quantcast
Channel: Answers by "KubaPrusak"
Viewing all articles
Browse latest Browse all 21

Answer by KubaPrusak

$
0
0
If you want the object to face the player you can use transform.LookAt(Transform target, Vector3 worldUp) where target would be the player Camera. worldUp is an optional parameter but you should set it to transform.forward; if the object doesn't rotate with the correct side facing the player, you can try using different Vectors (ie. transform.up, transform.right, transform.back etc). transform.LookAt and all of the transform.forward/up's refer to the transform of the object you are holding, not the player.

Viewing all articles
Browse latest Browse all 21

Trending Articles



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