Wednesday, August 24, 2022
HomeGame Developmentunity - i desire a solution to see by 3d objects or...

unity – i desire a solution to see by 3d objects or minimize out in 3d objects repeatedly upon mouse down


I need to see by 3d objects and proceed to see by with out utilizing instantiate however moderately minimize out within the 3d object.

I discovered this tutorial that sees by however doesn’t minimize out and hold chopping out but it surely exhibits and it’s hidden if you happen to transfer the cursor i need it to maintain displaying.
https://youtu.be/Blits1yymCw

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

I need 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 Begin()
    {
        for (int i = 0; i < ObjMasked.Size; i++)
        {
            ObjMasked[i].GetComponent<MeshRenderer>().materials.renderQueue = 3002;
        }
    }



    void Replace()
    {
        Vector3 mouse = Enter.mousePosition;
        Ray castPoint = Digital camera.foremost.ScreenPointToRay(mouse);
        RaycastHit hit;
        if (Physics.Raycast(castPoint, out hit, Mathf.Infinity))
        {
            remodel.place = hit.level;
        }
    }
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments