예제 #1
0
 void OffsetPlayerController(Vector3 offset)
 {
     groundMotor.ClearActivePlatform();
     acrobatMotor.AdjustFallStart(offset.y);
     playerMotor.transform.position += offset;
     StreamingWorld.OffsetWorldCompensation(offset, true);
 }
예제 #2
0
        void FixedUpdate()
        {
            // Must have streaming world reference
            if (!StreamingWorld)
            {
                return;
            }
            // Do nothing during streaming world init
            if (StreamingWorld.IsInit)
            {
                return;
            }


            if (CheckPosition())
            {
                Vector3 change = GetOffset(player.transform.position);
                _totalOffset += change;
                _lastOffset   = change;

                // Offset streaming world
                OffsetChildren(StreamingWorld.gameObject, change);
                StreamingWorld.OffsetWorldCompensation(change);

                // Update last position
                RaiseOnPositionUpdateEvent(change);             //##trigger position update
            }
        }
예제 #3
0
 void OffsetPlayerController(Vector3 offset)
 {
     playerMotor.ClearActivePlatform();
     playerMotor.transform.position += offset;
     StreamingWorld.OffsetWorldCompensation(offset, true);
 }