HireAmine Posted August 24, 2022 Share Posted August 24, 2022 how to detect if the cursor is on element. please help. Link to comment
Spakye Posted August 25, 2022 Share Posted August 25, 2022 (edited) Hello, if its a gui element you can use onClientMouseMove onClientMouseEnter and onClientMouseLeave depending what you try to achieve Edited August 25, 2022 by Spakye Link to comment
AngelAlpha Posted August 25, 2022 Share Posted August 25, 2022 20 hours ago, HireAmine said: how to detect if the cursor is on element. please help. if its a gui element use onClientMouseEnter and onClientMouseLeave if its a dx use isMouseInPosition Link to comment
HireAmine Posted August 25, 2022 Author Share Posted August 25, 2022 i mean 3d object in the real word in the gameplay Link to comment
Spakye Posted August 25, 2022 Share Posted August 25, 2022 Check this page and read the first sentences, it explains pretty much how to do what you want You might need to use getCursorPosition aswell https://wiki.multitheftauto.com/wiki/GetWorldFromScreenPosition Link to comment
HireAmine Posted August 25, 2022 Author Share Posted August 25, 2022 but how i can get the width and the Heigh of the element in the screen ? maybe math between the camera and the distance Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now