Home Game Development unity – i need a option to see via 3d objects or lower out in 3d objects constantly upon mouse down

unity – i need a option to see via 3d objects or lower out in 3d objects constantly upon mouse down

0
unity – i need a option to see via 3d objects or lower out in 3d objects constantly upon mouse down

[ad_1]

I need to see via 3d objects and proceed to see via with out utilizing instantiate however fairly lower out within the 3d object.

I discovered this tutorial that sees via however doesn’t lower out and preserve reducing out nevertheless it exhibits and it’s hidden when you transfer the cursor i would like it to maintain exhibiting.
https://youtu.be/Blits1yymCw

I need to do one thing like scratch card masks constantly cuts.
By steady i imply what has been proven is saved proven and extra is added to it whereas constantly holding mouse key.

I would like one thing that doesn’t overload reminiscence i feel instantiate overloads reminiscence.
I hope you understood me.

the code i've is

utilizing System.Collections;
utilizing System.Collections.Generic;
utilizing UnityEngine;

public class MaskObject : MonoBehaviour
{
    public GameObject[] ObjMasked;
    void Start()
    {
        for (int i = 0; i < ObjMasked.Length; i++)
        {
            ObjMasked[i].GetComponent<MeshRenderer>().materials.renderQueue = 3002;
        }
    }



    void Update()
    {
        Vector3 mouse = Input.mousePosition;
        Ray castPoint = Camera.predominant.ScreenPointToRay(mouse);
        RaycastHit hit;
        if (Physics.Raycast(castPoint, out hit, Mathf.Infinity))
        {
            rework.place = hit.level;
        }
    }
}

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here