Game Development Community

[Bug] Visible animation distance and Wind Emitter

by Stadi Thompson · in Torque 3D Professional · 12/19/2009 (2:09 pm) · 3 replies

currently we have trees and foilage that are using the wind emitter. we have some taller trees, but you can only see it swaying when you are right under it because they are higher in the air. can you extend the distance in which the wind animation plays? would be nice to see a few tall trees swaying. the swaying animations stops playing when you move a few feet away from the tree. can we change the default wind animation distance, if so how?

#1
12/19/2009 (10:50 pm)
This sounds like a bug.

If you look in ForestWindMgr::processTick() you can see the 'radius' which you can just increase in your case.

Or you could look in ForestData::getItems() which culls trees using a sphere... i suspect my "optimization" of doing squared radius comparisons is incorrect there and causing it to not work in your case.

I have planned an optimization for the 1.1 beta which should remove some of this duplicate effort of selecting trees to sway.
#2
02/22/2010 (6:37 pm)
thought i would bump this, still a bug in beta1
#3
02/22/2010 (7:50 pm)
Btw, there are two spots (they both were commented at least). In windDeformation.cpp there is a variable.

F32 toCamInterp

That needs to be changed as well. Dropped a pref in both and seems to be working well :-).

We jacked this value up quite a bit and I am not seeing much of a difference in performance (not seeing a drop or anything with a bunch of trees and other objects swaying). Would be a good candindate to add before 1.1 drops as increasing it from 25 helps quite a bit :-).