Exemple #1
0
        public AsgardPose getAsgardPose(WorldPose world)
        {
            GameObject v = vernier;

            v.transform.position = world.position;
            v.transform.rotation = world.rotation;
            v.transform.setGlobalScale(world.scale);
            return(new AsgardPose(v.transform));
        }
Exemple #2
0
        public static AsgardPose WorldToAsgard(WorldPose world, Transform transform)
        {
            Vector3 o = transform.localScale;

            transform.setGlobalScale(Vector3.one);
            float   d        = Yggdrasil.IsInitialized ? Yggdrasil.Instance._dilatation : 1.0f;
            Vector3 position = transform.InverseTransformPoint(world.position) / d;

            Vector3 up      = transform.InverseTransformDirection(world.up);
            Vector3 forward = transform.InverseTransformDirection(world.forward);
            Vector3 scale   = world.scale;

            transform.localScale = o;
            return(new AsgardPose(position, up, forward, scale));
        }
Exemple #3
0
 public AsgardPose getAsgardPose(WorldPose world)
 {
     return(WorldToAsgard(world, this.point));// new AsgardPose(position, up, forward, scale);
 }