July 2017
Beginner to intermediate
390 pages
10h 53m
English
As I said, I cannot show you how to do this in Unity3D. There is no such thing as different coordinate systems in that tool. But how would we go about achieving the same effect? Well, we need to write a script for that!
The following snippet is just for illustration purposes; it is not part of our RockOn app. But I want to show you how it is done anyway, so here it is: public class AttachedFrameBehaviour : MonoBehaviour { [Tooltip("The distance from the camera, in meters", order=1)] public float DistanceFromCamera; // Update is called once per frame void Update () { var cameraPos = Camera.main.transform.position; var myPos = cameraPos + new Vector3(0f, 0f, DistanceFromCamera); this.transform.position ...Read now
Unlock full access