mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
tried to use MovePosition()/MoveRotation(), but it doesn't work
This commit is contained in:
parent
34b9613782
commit
dcc65fa8c5
1 changed files with 11 additions and 0 deletions
|
@ -280,11 +280,22 @@ namespace SanAndreasUnity.Behaviours.Peds
|
|||
|
||||
private static void SetPosition(BoneInfo boneInfo, Vector3 receivedPosition)
|
||||
{
|
||||
// if (boneInfo.Rigidbody != null)
|
||||
// boneInfo.Rigidbody.MovePosition(boneInfo.Transform.TransformVector(receivedPosition));
|
||||
// else
|
||||
// boneInfo.Transform.localPosition = receivedPosition;
|
||||
|
||||
boneInfo.Transform.localPosition = receivedPosition;
|
||||
}
|
||||
|
||||
private static void SetRotation(BoneInfo boneInfo, Vector3 receivedRotation)
|
||||
{
|
||||
// Quaternion localRotation = Quaternion.Euler(receivedRotation);
|
||||
// if (boneInfo.Rigidbody != null)
|
||||
// boneInfo.Rigidbody.MoveRotation(boneInfo.Transform.TransformRotation(localRotation));
|
||||
// else
|
||||
// boneInfo.Transform.localRotation = localRotation;
|
||||
|
||||
boneInfo.Transform.localRotation = Quaternion.Euler(receivedRotation);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue