environment: Use resize when updating m_CachedObjects

This was a typo, otherwise the size is always 0.
This commit is contained in:
Joshua Ashton 2022-08-31 15:35:18 +01:00
parent 347e78d122
commit 522c26e253
1 changed files with 1 additions and 1 deletions

View File

@ -909,7 +909,7 @@ const IPhysicsObject **JoltPhysicsEnvironment::GetObjectList( int *pOutputObject
if ( pOutputObjectCount )
*pOutputObjectCount = nCount;
m_CachedObjects.reserve( nCount );
m_CachedObjects.resize( nCount );
for ( int i = 0; i < nCount; i++ )
{
JPH::Body *pBody = m_PhysicsSystem.GetBodyLockInterfaceNoLock().TryGetBody( m_CachedBodies[ i ] );