Most of the time, CBEffects pre-calculates angles so that relatively expensive math operations aren’t done each frame. That boosts performance, but makes the angles unchangeable on the fly.
You can set the “preCalculateAngles” parameter in the physics table:
[lua]
– In vent parameters
physics = {
preCalculateAngles = false
}
[/lua]
When it’s off, velocity vectors are calculated when needed (at runtime) instead of being stored.
preCalculateAngles doesn’t work perfectly (litotes alert) when angle ranges are provided.
You can manually recalculate angle ranges with vent.resetAngles(). It’s a rather expensive operation, based on the range of your angles (200-300 is more expensive than 200-220), so do be careful :). If your rocket isn’t rotating too quickly, you can do it in a delay, and with some “has changed” checks, and you shouldn’t be able to notice any problems.
I’ll see if I can implement this feature in a future release. I’ve also thought of completely eliminating the need for manual updating by calculating normals and extruding for the velocity… Wouldn’t take too long, just don’t have much time at the present (deadlines, yay!).
Most of the time, CBEffects pre-calculates angles so that relatively expensive math operations aren’t done each frame. That boosts performance, but makes the angles unchangeable on the fly.
You can set the “preCalculateAngles” parameter in the physics table:
[lua]
– In vent parameters
physics = {
preCalculateAngles = false
}
[/lua]
When it’s off, velocity vectors are calculated when needed (at runtime) instead of being stored.
preCalculateAngles doesn’t work perfectly (litotes alert) when angle ranges are provided.
You can manually recalculate angle ranges with vent.resetAngles(). It’s a rather expensive operation, based on the range of your angles (200-300 is more expensive than 200-220), so do be careful :). If your rocket isn’t rotating too quickly, you can do it in a delay, and with some “has changed” checks, and you shouldn’t be able to notice any problems.
I’ll see if I can implement this feature in a future release. I’ve also thought of completely eliminating the need for manual updating by calculating normals and extruding for the velocity… Wouldn’t take too long, just don’t have much time at the present (deadlines, yay!).