Simplify
This commit is contained in:
@@ -369,11 +369,11 @@ namespace FlaxEngine
|
|||||||
{
|
{
|
||||||
var transform = Transform;
|
var transform = Transform;
|
||||||
var q = Quaternion.RotationAxis(axis, angle * Mathf.DegreesToRadians);
|
var q = Quaternion.RotationAxis(axis, angle * Mathf.DegreesToRadians);
|
||||||
var dif = (transform.Translation - point) * q;
|
|
||||||
if (Vector3.NearEqual(point, transform.Translation))
|
if (Vector3.NearEqual(point, transform.Translation))
|
||||||
transform.Orientation *= q;
|
transform.Orientation *= q;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var dif = (transform.Translation - point) * q;
|
||||||
transform.Translation = point + dif;
|
transform.Translation = point + dif;
|
||||||
if (orientActor)
|
if (orientActor)
|
||||||
transform.Orientation *= q;
|
transform.Orientation *= q;
|
||||||
|
|||||||
Reference in New Issue
Block a user