Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
TiyoPAENGski's avatar
TiyoPAENGski
Explorer
2 years ago
Solved

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.