Skip to content

Instantly share code, notes, and snippets.

@Tunied
Last active September 25, 2022 03:53
Show Gist options
  • Save Tunied/0a5897df1c3347a1a7f8f3916cc693dc to your computer and use it in GitHub Desktop.
Save Tunied/0a5897df1c3347a1a7f8f3916cc693dc to your computer and use it in GitHub Desktop.
找寻到一个Ray入射到给定Plane上的入射点
var ray = Game.MainGame.Logic.Camera.UnityCamera.ScreenPointToRay(Mouse.current.position.ReadValue());
mGroundPlane.Raycast(ray, out var hitDistance);
var hitPoint = ray.GetPoint(hitDistance);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment