/// <summary>
 /// Default values method
 /// </summary>
 protected override void DefaultValues()
 {
     base.DefaultValues();
     this.IsVisible           = true;
     this.MaterialPath        = null;
     this.UseMaterialCopy     = false;
     this.maskBits            = CollisionCategory3D.All;
     this.collisionCategories = CollisionCategory3D.Cat1;
 }
Exemple #2
0
        /// <inheritdoc/>
        protected override bool OnAttached()
        {
            if (!base.OnAttached() ||
                this.TouchCursorEntity == null)
            {
                return(false);
            }

            this.touchCursor = this.TouchCursorEntity.FindComponentInChildren <CursorTouch>();
            this.xrJoint     = this.TouchCursorEntity.FindComponent <TrackXRJoint>();

            this.cursorCollisionCategoryMask = this.TouchCursorEntity.FindComponent <StaticBody3D>().MaskBits;

            this.UpdateOrder = this.touchCursor.UpdateOrder + 0.1f; // Ensure this is executed always after the main Cursor
            this.cam         = this.Managers.RenderManager.ActiveCamera3D;

            this.handrayTexture = this.rayLineMesh.DiffuseTexture;

            return(true);
        }