Ejemplo n.º 1
0
        public override void OnAttachedToNode(Node node)
        {
            CursorNode           = Node.CreateChild();
            CursorNode.Position  = Vector3.UnitZ * 100;    //hide cursor at start - pos at (0,0,100)
            CursorModel          = CursorNode.CreateComponent <Urho.Shapes.Plane>();
            CursorModel.ViewMask = 0x80000000;             //hide from raycasts (Raycast() uses a differen viewmask so the cursor won't be visible for it)
            CursorNode.RunActions(new RepeatForever(new ScaleTo(0.3f, 0.15f), new ScaleTo(0.3f, 0.2f)));

            var cursorMaterial = new Material();

            cursorMaterial.SetTexture(TextureUnit.Diffuse, Application.ResourceCache.GetTexture2D("Textures/Cursor.png"));
            cursorMaterial.SetTechnique(0, CoreAssets.Techniques.DiffAlpha);
            CursorModel.Material = cursorMaterial;

            app = (ArkitApp)Application;
            continuesHitTest             = app.ContinuesHitTestAtCenter;
            app.ContinuesHitTestAtCenter = true;
        }
Ejemplo n.º 2
0
 public UrhoARSessionDelegate(ArkitApp arkitApp)
 {
     this.arkitApp = new WeakReference <ArkitApp>(arkitApp);
 }