This adds limiting the ghost data to a specific area around the client.

By default it is not included in the build, you must #define GHOSTSCOPING in the torqueConfig.h to enable it.
The distance can be set via the mission file by adding

visibleGhostDistance = "1000";

Or if it is not set in the mission file it will default to what is defined in torqueConfig.h #defined as GHOSTSCOPING_DEFAULT_DISTANCE_IF_NOT_IN_MISSION

The mission default distance can be overridden on a per connection basis by using gameconnection:setVisibleGhostDistance and gameconnection:getVisibleGhostDistance

The logic for setting the scoping distance was moved from shapebase in the original design to SceneObject so that it will affect cameras, players, etc.
Sounds fine

 

From: Daniel Buckmaster [mailto:notifications@github.com] 
Sent: Sunday, December 07, 2014 2:43 AM
To: GarageGames/Torque3D
Cc: Vincent Gee
Subject: Re: [Torque3D] This adds limiting the ghost data to a specific area around the client. (#908)

 

In Engine/source/T3D/gameBase/gameBase.cpp:

> @@ -388,7 +388,14 @@ F32 GameBase::getUpdatePriority(CameraScopeQuery *camInfo, U32 updateMask, S32 u
>     // Weight by field of view, objects directly in front
>     // will be weighted 1, objects behind will be 0
>     F32 dot = mDot(pos,camInfo->orientation);
> +
> +#ifdef GHOSTSCOPING
> +   bool inFov = dot > camInfo->cosFov*1.5f;

Got it. I'm modifying this PR to get rid of the #defines and fall back to visibleDistance if no ghost distance is defined. Acceptable?

—
Reply to this email directly or view it on GitHub <https://github.com/GarageGames/Torque3D/pull/908/files#r21422581> .  <https://github.com/notifications/beacon/ACUNZHbVQUT8S-Gjthof1N6ypu5M6m-cks5nU_yRgaJpZM4C3pEc.gif>