Last active
September 25, 2022 03:53
-
-
Save Tunied/0a5897df1c3347a1a7f8f3916cc693dc to your computer and use it in GitHub Desktop.
找寻到一个Ray入射到给定Plane上的入射点
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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