You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPBGE: Implement physics and logic object activity culling.
The activity culling helps to disable the physics or logic
of an object depending of its distance to the nearest camera.
From user side options were added in both UI and python API
to control this feature. In UI the activity culling is put
in three level, scene, camera, object. The two first level
are enabled as default and the last disabled. Also the object
panel expose option to enabled physics or logic culling with
a different radius.
In python the attribute activityCulling is added to these
three levels and KX_GameObject receive four attributes to
enabled physics and logic culling and controlling their
radius.
In internal sources the activity culling info are stored into
KX_GameObject::ActivityCullingInfo which is owned by in
KX_GameObject::m_activityCullingInfo.
To suspend logic we suspend from SCA_IObject calling Suspend
and Resume but in the same time we need to suspend animation
as they are independant of logic and that it will be hard
to control them when the object doesn't run its logic.
To do so BL_ActionManager implement a suspend flag which disallow
any task creation in KX_Scene::UpdateAnimations.
Thanks for youle's work on this.
0 commit comments