What do you want to save?
Add Code snippet
New code examples
-
Go 2021-09-20 22:45:03
explosion godot
I'm not an expert with 3D games, I focus mainly on 2D games, but I think this should work: 1. After exploding get all objects in the range of explosion 2. Cast a ray to each object in the sphere 3. If the raycast is sucessful and nothing is in the way app... Add solution -
C# 2021-09-14 12:21:01
unity check when clicked on object
void Update() { // Check for mouse input if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; // Casts the ray and get the first game object hit Physics.Raycast(ray, out hit); ... Add solution