mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkTransformBase: virtual SetPosition/Rotation/Scale for users to overwrite if needed
This commit is contained in:
parent
02db1b03d5
commit
ae496ef0ee
@ -146,7 +146,7 @@ protected virtual Vector3 GetScale() =>
|
||||
coordinateSpace == CoordinateSpace.Local ? target.localScale : target.lossyScale;
|
||||
|
||||
// set local/world position
|
||||
protected void SetPosition(Vector3 position)
|
||||
protected virtual void SetPosition(Vector3 position)
|
||||
{
|
||||
if (coordinateSpace == CoordinateSpace.Local)
|
||||
target.localPosition = position;
|
||||
@ -155,7 +155,7 @@ protected void SetPosition(Vector3 position)
|
||||
}
|
||||
|
||||
// set local/world rotation
|
||||
protected void SetRotation(Quaternion rotation)
|
||||
protected virtual void SetRotation(Quaternion rotation)
|
||||
{
|
||||
if (coordinateSpace == CoordinateSpace.Local)
|
||||
target.localRotation = rotation;
|
||||
@ -164,7 +164,7 @@ protected void SetRotation(Quaternion rotation)
|
||||
}
|
||||
|
||||
// set local/world position
|
||||
protected void SetScale(Vector3 scale)
|
||||
protected virtual void SetScale(Vector3 scale)
|
||||
{
|
||||
if (coordinateSpace == CoordinateSpace.Local)
|
||||
target.localScale = scale;
|
||||
|
Loading…
Reference in New Issue
Block a user