CubismRaycastHit.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * Copyright(c) Live2D Inc. All rights reserved.
  3. *
  4. * Use of this source code is governed by the Live2D Open Software license
  5. * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
  6. */
  7. using Live2D.Cubism.Core;
  8. using UnityEngine;
  9. namespace Live2D.Cubism.Framework.Raycasting
  10. {
  11. /// <summary>
  12. /// Contains raycast information.
  13. /// </summary>
  14. public struct CubismRaycastHit
  15. {
  16. /// <summary>
  17. /// The hit <see cref="CubismDrawable"/>.
  18. /// </summary>
  19. public CubismDrawable Drawable;
  20. /// <summary>
  21. /// The distance the ray traveled until it hit the <see cref="CubismDrawable"/>.
  22. /// </summary>
  23. public float Distance;
  24. /// <summary>
  25. /// The hit position local to the <see cref="CubismDrawable"/>.
  26. /// </summary>
  27. public Vector3 LocalPosition;
  28. /// <summary>
  29. /// The hit position in world coordinates.
  30. /// </summary>
  31. public Vector3 WorldPosition;
  32. }
  33. }