pickUse

mail@pastecode.io avatar
unknown
csharp
24 days ago
311 B
2
Indexable
Never
[Export] private RayCast3D rayCast3D;	

void PickUse()
	{
		if(rayCast3D.IsColliding())
		{

		var collider = rayCast3D.GetCollider();
		//Debug.Print(collider.ToString());


		if(collider is RigidBody3D rb)
		{
		 
			Debug.Print("collider is Rigidbody3D");
			carried_rb = rb;
		}
		
		}
	}
Leave a Comment