Mouse position in game lua

0

How do you get mouse position in game world or relative to the screen?

Is it possible to get it as Vector3?

Specifically for lua.

Qvidd

질문됨 7년 전529회 조회
6개 답변
0
수락된 답변

Hey @REDACTEDUSER

Getting the mouse cursor position is not currently exposed to lua, but we'll add this as a request for a future release.

If it helps at all in the meantime, you can look at /dev/Code/CryEngine/CryAction/FlowSystem/Nodes/FlowMouseInfo.cpp for an example of how to get the mouse cursor position in C++, both relative to the screen (CFlowMouseCoordNode) and projected into the game world (CFlowMouseRayCast).

답변함 7년 전
profile picture
전문가
검토됨 한 달 전
0

Thanks for the reply @REDACTEDUSER

답변함 7년 전
0

+1

답변함 7년 전
0

Hey @REDACTEDUSER

One year later..Do we have now the possibility to get mouse cursor position with Lua on 1.15 ?

We need it to raycast (at each click) a ray from mouse position and retrieve any entity hit by this ray.

Thanks in advance,

Nassim

답변함 6년 전
0

I am also interested in a tutorial or answer. Need entities in the game to be able to be inspected with hovering over them with a mouse cursor.

답변함 5년 전
0

Any updates on this?

답변함 5년 전

이 게시물은 마감됨: 새 답변, 댓글 및 투표 추가가 비활성화되었습니다.

관련 콘텐츠