Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to make character respawn if touches sprite c#

//in your character create a new script then put this

 using UnityEngine;
 using System.Collections;
 
 public class respawn : MonoBehaviour {
     public float threshold;
 
     void FixedUpdate () {
         if (transform.position.y < threshold)
             transform.position = new Vector3(0, 0, 0);
     }
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: same click method lots of buttons c# 
Csharp :: how to move an object with addforce 
Csharp :: C# Floating Point Literals 
Csharp :: c# creat pen 
Csharp :: c# get first and last day of current month 
Csharp :: c# variables 
Csharp :: c# void with nullable List argument 
Csharp :: Console.WriteLine($"Hello {Ana.ToUpper($)}!"); 
Csharp :: c sharp tenery operator on an action 
Csharp :: Razor switch statement 
Csharp :: asp net route attribute vs httpget 
Csharp :: asp.net core mvc razor page call pagemodel actio 
Csharp :: erlang start net kernel 
Csharp :: c# how to output array 
Csharp :: c# webrtc dll 
Csharp :: c# open explorer and select file 
Csharp :: ASP.Net MVC 5 datalist event trap to perform action 
Csharp :: c# string is all zeros 
Csharp :: c# exec command output 
Csharp :: .net check connection 
Csharp :: make tooltip disappear c# 
Csharp :: How to convert output of HttpClient PostAsJsonAsync() into user defined list of object 
Csharp :: log4net.dll 
Csharp :: bootstrap daterangepicker change language to french 
Csharp :: how to change samesite=lax to samesite=none in asp.net 
Csharp :: in model add to give drop down message 
Csharp :: membership get user id 
Csharp :: how to display only date from datetime in mvc view 
Csharp :: how to make a methode accessible from all the forms c# 
Csharp :: how to colapse all methods visual studio 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =