Hi, I’m trying to define a function similar to the function Physics.Raycast(origin: Vector3, direction: Vector3, hitInfo: RaycastHit, distance: float = Mathf.Infinity, layerMask: int = DefaultRaycastLayers): bool;
Where it if it returns true it will also store information into one of its parameters, the “hitInfo” parameter, so how can I define a function that does this?
Thanks!
NOTE: I’m using javascript, I know how to do it in C# but I need in javascript