Skip to content

Commit

Permalink
Core/Physics: adding tangent speed to physics contact (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggcrunchy authored Nov 1, 2020
1 parent de51350 commit 3440352
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions librtt/Rtt_PhysicsContact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3440352

Please sign in to comment.