environment: Use resize when updating m_CachedObjects
This was a typo, otherwise the size is always 0.
This commit is contained in:
parent
d6e1214a19
commit
db13ffba6e
|
@ -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 ] );
|
||||
|
|
Loading…
Reference in New Issue