-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New events - onElementAttach/onElementDetach #3273
Comments
Also add onClientElementAttach and onClientElementDetach right? |
Yeah, sure, its pretty straightforward |
I wanted to extend my sincere thanks for your idea shared on GitHub! With your inspiration, I've created a pull request that implements the concept you've proposed. I hope you'll continue to share your ideas and feedback for future developments. Thank you, and I look forward to hearing more of your ideas! Best regards, |
What is the purpose of those events? Could you give an example of how to use it? |
You have a box attached to sadler. You want to detach it and drop it right behind the vehicle, keeping its rotation - you can do so using this. |
By the way, I also fixed the rotation bug in this PR, now the rotation remains even after detach. |
It doesn't look like a valid usage example. In this case, you should call a function that does deattach and handles next object position. There is no reason for spaghetti code. |
This would work only if you write the code yourself, and not use open-source resources from the web. This allows integration between resources coming from different developers without using exports. |
Recently, someone uploaded a resource, which can be used to improve the prelight of attached objects using a shader, for example these event would be very useful for that, so you don't need to export it from a util resource, just use the new built-in events. |
Is your feature request related to a problem? Please describe.
Currently we have no event to tell if element has ben attached/detached to any other element
Describe the solution you'd like
Two events
onElementAttach
\onElementDetach
Params:
element to which source has been attached
Vector 3 with global position of element after attaching
Vector3 with offset of attachment
Vector3 with rotation offset of attachment
(we may want vectors with detach as some people might want to keep rotation and position of element after for example deatching)
Describe alternatives you've considered
No response
Additional context
No response
Security Policy
The text was updated successfully, but these errors were encountered: