aiInfo getPosition now optionally takes a doCastray bool (off by default)

AIFlyingVehicleControllerData add flightfloor and cieling
resolvepitch from (portions of) the old aiflyingvehicle resource
no reversing for flyingvehicles, so bottom out resolvespeed at 0
This commit is contained in:
AzaezelX 2025-04-21 19:13:31 -05:00
parent 6200a6f1fb
commit 584093f48d
5 changed files with 96 additions and 21 deletions

View file

@ -236,17 +236,24 @@ class AIFlyingVehicleControllerData : public AIControllerData
Right,
Straight
};
F32 mFlightFloor;
F32 mFlightCeiling;
public:
AIFlyingVehicleControllerData()
{
resolveYawPtr.bind(this, &AIFlyingVehicleControllerData::resolveYaw);
resolvePitchPtr.bind(this, &AIFlyingVehicleControllerData::resolvePitch);
resolveSpeedPtr.bind(this, &AIFlyingVehicleControllerData::resolveSpeed);
mHeightTolerance = 200.0f;
mFlightCeiling = 200.0f;
mFlightFloor = 1.0;
}
static void initPersistFields();
F32 getSteeringAngle(AIController* obj, Point3F location);
void resolveYaw(AIController* obj, Point3F location, Move* movePtr);
void resolveSpeed(AIController* obj, Point3F location, Move* movePtr);
void resolvePitch(AIController* obj, Point3F location, Move* movePtr);
DECLARE_CONOBJECT(AIFlyingVehicleControllerData);
};
#endif // TORQUE_NAVIGATION_ENABLED