From 34403527ae6aa75866af26b367806d2e2bb85965 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Sun, 1 Nov 2020 00:49:25 -0500 Subject: [PATCH] Core/Physics: adding tangent speed to physics contact (#188) --- librtt/Rtt_PhysicsContact.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/librtt/Rtt_PhysicsContact.cpp b/librtt/Rtt_PhysicsContact.cpp index 59c218a97..9881bb62f 100644 --- a/librtt/Rtt_PhysicsContact.cpp +++ b/librtt/Rtt_PhysicsContact.cpp @@ -87,6 +87,12 @@ PhysicsContact::ValueForKey( lua_State *L ) { lua_pushnumber( L, contact->GetRestitution() ); } +// STEVE CHANGE + else if ( 0 == strcmp( "tangentSpeed", key ) ) + { + lua_pushnumber( L, contact->GetTangentSpeed() ); + } +// /STEVE CHANGE else { result = 0; @@ -117,6 +123,12 @@ PhysicsContact::SetValueForKey( lua_State *L ) { contact->SetRestitution( lua_tonumber( L, 3 ) ); } +// STEVE CHANGE + else if ( 0 == strcmp( "tangentSpeed", key ) ) + { + contact->SetTangentSpeed( lua_tonumber( L, 3 ) ); + } +// /STEVE CHANGE } return 0;