Page 1 of 1

GetUnitFacing

Posted: Mon Aug 24, 2015 5:53 am
by enric
facing = GetUnitFacing(me);

This call used on a Soviet Infantry gives values like:
90 ( the only comprensible)
52
15
324
269
etc
I understand that 15 means 0 and 52 means 45, but …

Used on a SU-122, for example, gives the correct angle: 0, 45, 90, etc.

A little light, please :D

Re: GetUnitFacing

Posted: Mon Aug 31, 2015 4:19 pm
by pipfromslitherine
Hmmm - it could be that the units are facing in different directions because of how they are bunched? Hmmm - wierd though. All units go through the same code. How does the unit actually look?

Cheers

Pip

Re: GetUnitFacing

Posted: Mon Aug 31, 2015 4:37 pm
by enric
They are both standard units of BA2 ( no modified)

soviet_rifle
SU-122

Re: GetUnitFacing

Posted: Mon Aug 31, 2015 9:27 pm
by pipfromslitherine
I mean, when you have them adjacent, does the infantry point in another direction?

Cheers

Pip

Re: GetUnitFacing

Posted: Tue Sep 01, 2015 6:55 am
by enric
No, in a perceptible way.

Re: GetUnitFacing

Posted: Tue Sep 01, 2015 2:24 pm
by enric
Just rotating the same unit

Re: GetUnitFacing

Posted: Tue Sep 01, 2015 3:32 pm
by pipfromslitherine
I will have to dig into it. Not sure what is going on! My guess is that the first man (which is the one it always uses for multi-man units) is being offset, perhaps for aesthetic reasons.

Cheers

Pip

Re: GetUnitFacing

Posted: Tue Sep 01, 2015 3:52 pm
by enric
The bizarre is that the same unit facing sometimes gives, for example 5 or 6, and 180 or 174.