|
| 01 Nov 2015 10:28 PM |
I've tried.. I really need help on this how tf do i make breakable glass? like in Phantom Forces Iv'e made my own script where i made CanCollide false when you hit the window but that failed.. please help |
|
|
| Report Abuse |
|
|
PvN
|
  |
| Joined: 10 Apr 2010 |
| Total Posts: 22145 |
|
| |
|
AlgyLacey
|
  |
| Joined: 14 Jun 2013 |
| Total Posts: 3736 |
|
|
| 02 Nov 2015 04:27 AM |
You need to make the parts of the window how you want when you break them. Put those parts in exactly the same place as the window, then make them invisible. When something touches the big window, make the big window invisible and the pieces visible, un-anchor the small pieces and bingo!
#code local First, Second, Third = "Create", "Publish", "Improve" |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2015 05:04 AM |
You could use a finite number of window sizes. For each window size, have two models. One will just be a normal window pane. The other will be a window pane with its glass broken into pieces. When the window is shot, replace the pane with the broken pane of the same size, and give each shard of glass a random velocity + the direction of the shot.
Alternatively, you could break the windows procedurally. Repeatedly break each shard (there will only be 1 at first, the whole pane) into two, smaller parts along the shortest axis (that is not the thickness). This will give you many, randomly sized rectangular shards of glass without any modeling work. |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2015 07:28 AM |
Create segmented windows via unions and negatives, script for onTouch when a bullet hit's the window change the anchor option for the segmented windows to false and add a bit of body velocity.
Your Welcome
~I would spit on you, but I don't want to turn you on.~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Nov 2015 08:45 AM |
| alright i'll try what you guys told me to do and see how it works out thanks |
|
|
| Report Abuse |
|
|
|
| 02 Nov 2015 10:08 AM |
Hmm... I got an idea, but I need to test it first. I'm not so sure about what I'm about to do...
Sizing and positioning in a script... *shudders* |
|
|
| Report Abuse |
|
|