Forum Discussion
TiyoPAENGski
2 years agoExplorer
Break a Glass using Meta SDK
Hi. Is there anyone have any idea how to create a breaking glass using meta sdk? I'm developing a new project at the moment and I don't have any idea what am I doing.
You'll first need to create a fractured version of your glass in a 3D package like Blender (https://www.youtube.com/watch?v=S1UvEd1xkco) Add the rigidbody and mesh collider for each piece as shown in that video, but you'll probably want to to a runtime swap between the original model (prefab) and the fractured (prefab), perhaps when the glass hits the floor, or whatever is appropriate for your scene. So perhaps start with the unbroken glass and attach a script to it that has an OnCollision method (https://www.youtube.com/watch?v=QRp4V1JTZnM) then when that's detected, instantiate the fractured prefab and disable the original glass.
2 Replies
Replies have been turned off for this discussion
You'll first need to create a fractured version of your glass in a 3D package like Blender (https://www.youtube.com/watch?v=S1UvEd1xkco) Add the rigidbody and mesh collider for each piece as shown in that video, but you'll probably want to to a runtime swap between the original model (prefab) and the fractured (prefab), perhaps when the glass hits the floor, or whatever is appropriate for your scene. So perhaps start with the unbroken glass and attach a script to it that has an OnCollision method (https://www.youtube.com/watch?v=QRp4V1JTZnM) then when that's detected, instantiate the fractured prefab and disable the original glass.
- TiyoPAENGskiExplorer
Thank you very much. After a few days, I have finally done it!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 12 months ago