Jump to content

Recommended Posts

Posted

Hi guys,

I want to break glass in Leadwerks. I want to breaking glass when I shoot with a gun or glass fall from high.

 

note: my english is bad so i'm sorry

 

Posted

This is an art problem. Everyone can figure out how to hide one model and replace it with a bunch of broken pieces, but you need the model / texture to make this.

Let's build cool stuff and have fun. :)

Posted

This is an art problem. Everyone can figure out how to hide one model and replace it with a bunch of broken pieces, but you need the model / texture to make this.

 

Thanks, but i am not know Lua or C++ im beginner. So i'm not break glass.

note: my english is bad so i'm sorry


  •  


  •  

 

Posted

The simple way is when a collision occurs, you just hide the existing model and show a bunch of fragments that represent the broken model. You need to understand how entity scripts work in order to do this:

http://www.leadwerks.com/werkspace/page/tutorials/_/lua-scripting-r12#section6

 

The Newton API is all accessible in C++. I have not gotten into the breakage stuff yet because I felt like it wouldn't work like people expect, and would just open the door to more requests, and would always be considered incomplete. Physics breakage tends to work well for a single object that all breaks at once, but it doesn't work well when you get into supporting structures, like one piece falling because another was destroyed.

  • Upvote 1

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...