static public int SweepTest(IntPtr l) { try{ if (matchType(l, 2, typeof(UnityEngine.Vector3), typeof(UnityEngine.RaycastHit), typeof(System.Single))) { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); UnityEngine.RaycastHit a2; System.Single a3; checkType(l, 4, out a3); System.Boolean ret = self.SweepTest(a1, out a2, a3); pushValue(l, ret); pushValue(l, a2); return(2); } else if (matchType(l, 2, typeof(UnityEngine.Vector3), typeof(UnityEngine.RaycastHit))) { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); UnityEngine.RaycastHit a2; System.Boolean ret = self.SweepTest(a1, out a2); pushValue(l, ret); pushValue(l, a2); return(2); } LuaDLL.luaL_error(l, "No matched override function to call"); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public static RaycastHit Sweeptest(Rigidbody _rigidbody, Vector3 direction, float distance) { RaycastHit hitInfo; if (_rigidbody.SweepTest(direction, out hitInfo,distance)) { return hitInfo; } else { return hitInfo; } }
static public int SweepTest(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 5) { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); UnityEngine.RaycastHit a2; System.Single a3; checkType(l, 4, out a3); UnityEngine.QueryTriggerInteraction a4; checkEnum(l, 5, out a4); var ret = self.SweepTest(a1, out a2, a3, a4); pushValue(l, true); pushValue(l, ret); pushValue(l, a2); return(3); } else if (argc == 4) { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); UnityEngine.RaycastHit a2; System.Single a3; checkType(l, 4, out a3); var ret = self.SweepTest(a1, out a2, a3); pushValue(l, true); pushValue(l, ret); pushValue(l, a2); return(3); } else if (argc == 3) { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); UnityEngine.RaycastHit a2; var ret = self.SweepTest(a1, out a2); pushValue(l, true); pushValue(l, ret); pushValue(l, a2); return(3); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
static int SweepTest(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { UnityEngine.Rigidbody obj = (UnityEngine.Rigidbody)ToLua.CheckObject(L, 1, typeof(UnityEngine.Rigidbody)); UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2); UnityEngine.RaycastHit arg1; bool o = obj.SweepTest(arg0, out arg1); LuaDLL.lua_pushboolean(L, o); ToLua.Push(L, arg1); return(2); } else if (count == 4) { UnityEngine.Rigidbody obj = (UnityEngine.Rigidbody)ToLua.CheckObject(L, 1, typeof(UnityEngine.Rigidbody)); UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2); UnityEngine.RaycastHit arg1; float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); bool o = obj.SweepTest(arg0, out arg1, arg2); LuaDLL.lua_pushboolean(L, o); ToLua.Push(L, arg1); return(2); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Rigidbody.SweepTest")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }