Ticket #831 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Ranged units do not always face their targets when attacking.

Reported by: michael Owned by:
Priority: Must Have Milestone: Alpha 6
Component: UI & Simulation Keywords:
Cc:

Description

Ranged units do not always face their targets when attacking. This leads to strange-looking behavior during battles.

To confirm this, watch an enemy unit walk into range of your ranged units and watch your ranged units' behavior as they throw their projectiles. As the enemy unit moves position, your ranged units will not reorient themselves to face the enemy. Their projectiles will fly toward the enemy even though your units may be facing the opposite direction. Manually tasking your units to re-target the enemy units seems to correct this for a small time.

Attachments

checkTargetAngle.diff (1.6 KB) - added by Badmadblacksad 2 years ago.

Change History

comment:1 Changed 2 years ago by michael

  • Priority changed from Release Blocker to Must Have

Changed 2 years ago by Badmadblacksad

comment:2 Changed 2 years ago by Badmadblacksad

I don't commit this patch now, since the release is coming, and I don't want to add a bug.

Maybe the ships should be handled differently (We don't mind if a ship don't face its opponent).

comment:3 Changed 2 years ago by Philip

Currently rotation is essentially just a graphical effect, so I think it might be more appropriate to always rotate instantly (regardless of angle) and not have a CheckTargetAngle that can return false (which I assume would delay the attack while the unit pathfinds again), so that rotation still won't affect the gameplay (and so you can never e.g. trick an enemy into never firing by running around them too fast). Maybe should expose CCmpUnitMotion::FaceTowardsPoint to scripts and have them call that when appropriate, or something.

comment:4 Changed 2 years ago by Badmadblacksad

I didn't see your answer,

Indeed, I wanted to avoid seeing units turning instantly like in AoE 2 (especially catapults/siege units).

comment:5 Changed 2 years ago by Badmadblacksad

  • Status changed from new to closed
  • Resolution set to fixed

(In [9595]) Ranged units always face their targets when attacking. fixes #831

Note: See TracTickets for help on using tickets.