mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-28 00:29:34 +00:00
skip sidestepping off a cliff raycast if we're not sidestepping
take current velocity into account for vehicles since some degree of momentum will be maintained
This commit is contained in:
parent
675bdfe6b3
commit
b2021caa6d
2 changed files with 24 additions and 22 deletions
|
|
@ -670,7 +670,7 @@ void AIWheeledVehicleControllerData::resolveYaw(AIController* obj, Point3F locat
|
|||
Point3F aimLoc = obj->mMovement.mAimLocation;
|
||||
|
||||
// Get the AI to Target vector and normalize it.
|
||||
Point3F toTarg = location - aimLoc;
|
||||
Point3F toTarg = (location + wvo->getVelocity() * TickSec) - aimLoc;
|
||||
toTarg.normalize();
|
||||
|
||||
F32 dotYaw = -mDot(right, toTarg);
|
||||
|
|
@ -746,7 +746,7 @@ void AIFlyingVehicleControllerData::resolveYaw(AIController* obj, Point3F locati
|
|||
Point3F aimLoc = obj->mMovement.mAimLocation;
|
||||
|
||||
// Get the Target to AI vector and normalize it.
|
||||
Point3F toTarg = location - aimLoc;
|
||||
Point3F toTarg = (location + fvo->getVelocity() * TickSec) - aimLoc;
|
||||
toTarg.normalize();
|
||||
|
||||
F32 dotYaw = -mDot(right, toTarg);
|
||||
|
|
@ -774,7 +774,7 @@ void AIFlyingVehicleControllerData::resolvePitch(AIController* obj, Point3F loca
|
|||
aimLoc.z = mClampF(aimLoc.z, mFlightFloor, mFlightCeiling);
|
||||
|
||||
// Get the Target to AI vector and normalize it.
|
||||
Point3F toTarg = location - aimLoc;
|
||||
Point3F toTarg = (location + fvo->getVelocity() * TickSec) - aimLoc;
|
||||
toTarg.normalize();
|
||||
F32 lastPitch = fvo->getSteering().y;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue