Physics2D: Expose elasticity/friction/surface velocity

This commit is contained in:
Lynix
2018-10-09 23:22:28 +02:00
parent dc6fbfc90f
commit 30348525d7
8 changed files with 294 additions and 14 deletions

View File

@@ -20,9 +20,12 @@ namespace Nz
{
cpShape* shape = (*shapes)[i];
cpShapeSetCollisionType(shape, cpFloat(m_collisionId));
cpShapeSetElasticity(shape, cpFloat(m_elasticity));
cpShapeSetFilter(shape, filter);
cpShapeSetCollisionType(shape, m_collisionId);
cpShapeSetFriction(shape, cpFloat(m_friction));
cpShapeSetSensor(shape, (m_trigger) ? cpTrue : cpFalse);
cpShapeSetSurfaceVelocity(shape, cpv(cpFloat(m_surfaceVelocity.x), cpFloat(m_surfaceVelocity.y)));
}
return shapeCount;