static void ContactPoint_otherCollider(JSVCall vc) { UnityEngine.ContactPoint _this = (UnityEngine.ContactPoint)vc.csObj; var result = _this.otherCollider; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); }
static void ContactPoint_normal(JSVCall vc) { UnityEngine.ContactPoint _this = (UnityEngine.ContactPoint)vc.csObj; var result = _this.normal; JSApi.setVector3S((int)JSApi.SetType.Rval, result); }
static public int constructor(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.ContactPoint o; o = new UnityEngine.ContactPoint(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
public Collision(Vector3 relativeVelocity, ITransform transform, TestableGameObject gameObject, ContactPoint[] contacts) : this() { this.relativeVelocity = relativeVelocity; this.transform = transform; this.gameObject = gameObject; this.contacts = contacts; }
static public int constructor(IntPtr l) { try { UnityEngine.ContactPoint o; o = new UnityEngine.ContactPoint(); pushValue(l, o); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { UnityEngine.ContactPoint o; o=new UnityEngine.ContactPoint(); pushValue(l,true); pushValue(l,o); return 2; } catch(Exception e) { return error(l,e); } }
static public int constructor(IntPtr l) { try { UnityEngine.ContactPoint o; o = new UnityEngine.ContactPoint(); pushValue(l, o); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public static int constructor(IntPtr l) { try { UnityEngine.ContactPoint o; o=new UnityEngine.ContactPoint(); pushValue(l,o); return 1; } catch(Exception e) { LuaDLL.luaL_error(l, e.ToString()); return 0; } }
static int GetContact(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Collision obj = (UnityEngine.Collision)ToLua.CheckObject <UnityEngine.Collision>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); UnityEngine.ContactPoint o = obj.GetContact(arg0); ToLua.PushValue(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_thisCollider(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.ContactPoint obj = (UnityEngine.ContactPoint)o; UnityEngine.Collider ret = obj.thisCollider; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index thisCollider on a nil value" : e.Message)); } }
static int get_separation(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.ContactPoint obj = (UnityEngine.ContactPoint)o; float ret = obj.separation; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index separation on a nil value" : e.Message)); } }
private CollisionFlags CollisionLocation(Vector3 tubeBottom, Vector3 tubeHeight, ContactPoint contact) { Vector3 contactOffset = contact.point - tubeBottom; float c1 = Vector3.Dot(contactOffset, tubeHeight); if (c1 < 0.0f) { return CollisionFlags.Below; } float c2 = Vector3.Dot(tubeHeight, tubeHeight); if (c2 < c1) { return CollisionFlags.Above; } return CollisionFlags.Sides; }
static public int get_otherCollider(IntPtr l) { UnityEngine.ContactPoint o = (UnityEngine.ContactPoint)checkSelf(l); pushValue(l, o.otherCollider); return(1); }
static public int get_normal(IntPtr l) { UnityEngine.ContactPoint o = (UnityEngine.ContactPoint)checkSelf(l); pushValue(l, o.normal); return(1); }
/// <summary> /// Called by the game when a collision continues. Used to query latests collision information. /// </summary> /// <param name="c">collision information</param> public void OnCollisionStay(Collision c) { if (isActive) { collidingObject = c.collider.gameObject; collisionPoint = c.contacts[0]; } }
static int _CreateUnityEngine_ContactPoint(IntPtr L) { UnityEngine.ContactPoint obj = new UnityEngine.ContactPoint(); ToLua.PushValue(L, obj); return(1); }