| | 1 | | using DCL.Configuration; |
| | 2 | | using DCL.Controllers; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace ECSSystems.Helpers |
| | 6 | | { |
| | 7 | | public static class Vector3Helper |
| | 8 | | { |
| | 9 | | public static void Set(ref Vector3 target, ref Vector3 source) |
| | 10 | | { |
| 0 | 11 | | target.x = source.x; |
| 0 | 12 | | target.y = source.y; |
| 0 | 13 | | target.z = source.z; |
| 0 | 14 | | } |
| | 15 | |
|
| | 16 | | public static void Set(ref Vector3 target, float x, float y, float z) |
| | 17 | | { |
| 0 | 18 | | target.x = x; |
| 0 | 19 | | target.y = y; |
| 0 | 20 | | target.z = z; |
| 0 | 21 | | } |
| | 22 | |
|
| | 23 | | public static void SetInSceneOffset(ref Vector3 target, IParcelScene scene, ref Vector3 position, ref Vector3 wo |
| | 24 | | { |
| 8 | 25 | | target.x = (position.x + worldOffset.x) - scene.sceneData.basePosition.x * ParcelSettings.PARCEL_SIZE; |
| 8 | 26 | | target.y = (position.y + worldOffset.y); |
| 8 | 27 | | target.z = (position.z + worldOffset.z) - scene.sceneData.basePosition.y * ParcelSettings.PARCEL_SIZE; |
| 8 | 28 | | } |
| | 29 | | } |
| | 30 | | } |