Physics2D tests (#129)
* Quaternion: Fix singularity on Z axis when converting to euler angles * CollisionComponent2D: Add method to retrieve AABB * Collider2D: Fix constructor for Box with Vector2 * Physics2D: Fix rotation (Chipmunk works with radian and Nazara degrees) and copy constructor of RigidBody2D * Colider2D: Add New for convex and tests for the new classes
This commit is contained in:
committed by
Jérôme Leclercq
parent
9806231b5c
commit
41a1b5d493
@@ -114,6 +114,15 @@ namespace Nz
|
||||
return object.release();
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
ConvexCollider2DRef ConvexCollider2D::New(Args&&... args)
|
||||
{
|
||||
std::unique_ptr<ConvexCollider2D> object(new ConvexCollider2D(std::forward<Args>(args)...));
|
||||
object->SetPersistent(false);
|
||||
|
||||
return object.release();
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
NullCollider2DRef NullCollider2D::New(Args&&... args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user