mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
use MovePosition()/MoveRotation()
This commit is contained in:
parent
92788d4db0
commit
acf3f2a20d
1 changed files with 2 additions and 2 deletions
|
@ -271,7 +271,7 @@ namespace SanAndreasUnity.Net
|
|||
private void SetPosition(Vector3 pos)
|
||||
{
|
||||
if (m_hasRigidBody)
|
||||
m_rigidbody.position = pos;
|
||||
m_rigidbody.MovePosition(pos);
|
||||
else if (m_hasTransform)
|
||||
m_transform.localPosition = pos;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ namespace SanAndreasUnity.Net
|
|||
private void SetRotation(Quaternion rot)
|
||||
{
|
||||
if (m_hasRigidBody)
|
||||
m_rigidbody.rotation = rot;
|
||||
m_rigidbody.MoveRotation(rot);
|
||||
else if (m_hasTransform)
|
||||
m_transform.localRotation = rot;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue