RA2lover
|
  |
| Joined: 09 Nov 2008 |
| Total Posts: 1254 |
|
|
| 23 Nov 2014 03:38 PM |
I was trying to optimize a script calculating aerodynamic forces.
Instead of using wait(0.1) and wasting resources on idle parts, i was trying to calculate it whenever a part's velocity changed. it would be as simple as replacing "while wait(0.1) do" with "part.Changed:connect(function()" and adding a ) at the end of that function.
however, the event doesn't fire when the part's position is changed through normal physics interactions.
how do i go at solving this? |
|
|
| Report Abuse |
|
|
cxcharlie
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
|
| 23 Nov 2014 04:21 PM |
I think that's a bug .-.
U wot m8 |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 23 Nov 2014 05:04 PM |
| Position, velocity, and related properties that describe physical states do not fire the changed function as they get updated constantly; wait(.1) runs 10 times a second, using changed would run at least at your framerate. |
|
|
| Report Abuse |
|
|