static public int ClosestPointOnBounds(IntPtr l) { try { UnityEngine.Rigidbody self = (UnityEngine.Rigidbody)checkSelf(l); UnityEngine.Vector3 a1; checkType(l, 2, out a1); var ret = self.ClosestPointOnBounds(a1); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static int ClosestPointOnBounds(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Rigidbody obj = (UnityEngine.Rigidbody)ToLua.CheckObject(L, 1, typeof(UnityEngine.Rigidbody)); UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2); UnityEngine.Vector3 o = obj.ClosestPointOnBounds(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// pushes a rigidbody using the controller's own 'PhysicsPushMode'. /// if mode is 'Kinetic', the point of impact will automatically be /// the rigidbody's closest point on bounds to the center of the /// controller collider /// </summary> public void PushRigidbody(Rigidbody rigidbody, Vector3 moveDirection) { PushRigidbody(rigidbody, moveDirection, this.PhysicsPushMode, (this.PhysicsPushMode == PushForceMode.Simplified ? Vector3.zero : rigidbody.ClosestPointOnBounds(Collider.bounds.center))); }
public override void OnEnter() { rigidbody = ownerDefault.GetComponent <UnityEngine.Rigidbody> (); owner.SetVector3(store, rigidbody.ClosestPointOnBounds(owner.GetValue(position))); Finish(); }
public override void OnEnter () { rigidbody = ownerDefault.GetComponent<UnityEngine.Rigidbody> (); owner.SetVector3 (store, rigidbody.ClosestPointOnBounds (owner.GetValue(position))); Finish (); }