[英]How to find the mouse position in Unity using the New Input System
如何在 Unity 中找到鼠标 position? 我正在使用新的输入系统,我已经尝试过
InputDevice mouse = Mouse.current;
Ray ray = camera.ScreenPointToRay(mouse.position);
,但它没有用。 任何人?
用这个:
Ray ray = camera.ScreenPointToRay(Mouse.current.position.ReadValue());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.