Beispiel #1
0
 private void mount()
 {
     if (!_enable || hasChanged())
     {
         Transform           point = this.getMountPoint();
         Yggdrasil.WorldPose wp    = Yggdrasil.AsgardToWorld(this.asgardPose_, point);
         Transform           tsfm  = this.getTransform();
         tsfm.position = wp.position;
         tsfm.rotation = Quaternion.LookRotation(wp.forward, wp.up);
         tsfm.setGlobalScale(wp.scale);
         _enable = true;
     }
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     asgardPose_ = Yggdrasil.WorldToAsgard(new Yggdrasil.WorldPose(this.getTransform()), this._target);
     mount();
 }