fix mutually canceling orbits
This commit is contained in:
@@ -52,8 +52,9 @@ void MovementIntentSystem::tick(EntityAdmin& admin)
|
||||
QVector2D destination = intent.target;
|
||||
if (intent.orbitRadius_tiles > 0.0f)
|
||||
{
|
||||
const float sign = OrbitMath::resolveOrbitSign(pos.value, intent.target,
|
||||
body.velocity_tpt);
|
||||
const float sign = OrbitMath::resolveOrbitSign(
|
||||
pos.value, intent.target, body.velocity_tpt,
|
||||
intent.orbitCenterVelocity_tpt);
|
||||
destination = OrbitMath::computeOrbitDestination(
|
||||
pos.value, intent.target, intent.orbitRadius_tiles, sign);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user