What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 12:00:11
unity make raycast ignore object
Transform targetTransform = null; // target assigned in inspector RaycastHit[] hits; // returned hits LayerMask mask = new LayerMask(); // set in inspector - USE LAYER MASK TO FILTER hits = Physics.RaycastAll(transform.position, transform.forward, ma... Add solution -
C# 2022-03-16 13:35:27
The type or namespace name 'Target' could not be found (are you missing a using directive or an assembly reference?)
} public float damage = 100f; // Update is called once per frame void Update () { if (Input.GetButtonDown("Fire1")) { shoot(); } } void shoot() { RaycastHit hit; if (Physics.Raycast(transform.position,transform.forwa... Add solution -
Other 2021-11-09 23:49:07
3d mouse raycast object hit name
if ( Input.GetMouseButtonDown (0)){ RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if ( Physics.Raycast (ray,out hit,100.0f)) { StartCoroutine(ScaleMe(hit.transform)); Debug.Log("You selected the &q... Add solution -
C# 2021-11-07 23:17:18
let the plaer draw in unity
// Write black pixels onto the GameObject that is located // by the script. The script is attached to the camera. // Determine where the collider hits and modify the texture at that point. // // Note that the MeshCollider on the GameObject must have Conve... Add solution