Physics3D/RigidBody3D: Fix copy constructor not copying all states
This commit is contained in:
parent
0df70dcb16
commit
b8e447e4fe
|
|
@ -36,6 +36,7 @@ Nazara Engine:
|
|||
- Add linear and angular damping accessor to RigidBody3D
|
||||
- Fix MemoryStream::WriteBlock "Invalid buffer" assertion triggering when writing a zero-sized block
|
||||
- ⚠️ Rename RigidBody3D::[Get|Set]Velocity to [Get|Set]LinearVelocity
|
||||
- Fix RigidBody3D copy constructor not copying all physics states (angular/linear damping/velocity, mass center, position and rotation)
|
||||
|
||||
Nazara Development Kit:
|
||||
- Added ImageWidget (#139)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,15 @@ namespace Nz
|
|||
|
||||
m_body = NewtonCreateDynamicBody(m_world->GetHandle(), m_geom->GetHandle(m_world), m_matrix);
|
||||
NewtonBodySetUserData(m_body, this);
|
||||
|
||||
SetMass(object.m_mass);
|
||||
SetAngularDamping(object.GetAngularDamping());
|
||||
SetAngularVelocity(object.GetAngularVelocity());
|
||||
SetLinearDamping(object.GetLinearDamping());
|
||||
SetLinearVelocity(object.GetLinearVelocity());
|
||||
SetMassCenter(object.GetMassCenter());
|
||||
SetPosition(object.GetPosition());
|
||||
SetRotation(object.GetRotation());
|
||||
}
|
||||
|
||||
RigidBody3D::RigidBody3D(RigidBody3D&& object) :
|
||||
|
|
|
|||
Loading…
Reference in New Issue