What is turninplaceanglelimit for and is it in 87.0?
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
What is turninplaceanglelimit for and is it in 87.0?
Beherith added turninplaceanglelimit to BA but I cannot get it to work. If I understand correctly turninplaceanglelimit=130 and turninplacespeedlimit=0 should cause units to only slow down for sharp turns. My units slow down for any turn with these tags set.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: What is turninplaceanglelimit for and is it in 87.0?
It still looks like the tag has no effect in 88.0.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: What is turninplaceanglelimit for and is it in 87.0?
That was not helpful. What is the angle range of this tag?
Re: What is turninplaceanglelimit for and is it in 87.0?
It is helpful, just check where turnInPlaceAngleLimit occurs.
tip: turnInPlaceSpeedLimit & turnInPlaceAngleLimit are mutual exlusive.
tip2: the range of such values in that code part is obv. in degree (there are *180 & *360). Still you should check if there is a space-transform in the UnitDef when reading them from LuaDefs.
tip: turnInPlaceSpeedLimit & turnInPlaceAngleLimit are mutual exlusive.
tip2: the range of such values in that code part is obv. in degree (there are *180 & *360). Still you should check if there is a space-transform in the UnitDef when reading them from LuaDefs.
Re: What is turninplaceanglelimit for and is it in 87.0?
I did not really understand it either.
hm ok.
so reqTurnAngle isWith the wantedHeading I am lost.
But I also do not understand some fundamental things:
I thought spring units can only turn at always the same rate.
So to drive a bigger circle units still turn at the same amount per frame, just with longer pauses in between (while going forward)?
So what angle is turnInPlaceAngleLimit really compared with?
---
CGroundMoveType::BreakingDistance, startBreaking etc:
Isn't it spelled without "e"? (to brake = slow down, break = fall apart. note sure but google agrees)
Code: Select all
if (reqTurnAngle > ud->turnInPlaceAngleLimit) {
targetSpeed = turnSpeed;
so reqTurnAngle is
Code: Select all
const float reqTurnAngle = math::fabs(180.0f * (owner->heading - wantedHeading) / SHORTINT_MAXVALUE);
But I also do not understand some fundamental things:
I thought spring units can only turn at always the same rate.
So to drive a bigger circle units still turn at the same amount per frame, just with longer pauses in between (while going forward)?
So what angle is turnInPlaceAngleLimit really compared with?
---
CGroundMoveType::BreakingDistance, startBreaking etc:
Isn't it spelled without "e"? (to brake = slow down, break = fall apart. note sure but google agrees)
Re: What is turninplaceanglelimit for and is it in 87.0?
imagine how units feelWith the wantedHeading I am lost.
yesI thought spring units can only turn at always the same rate.
yesSo to drive a bigger circle units still turn at the same amount per frame
no, by going faster (turning radius is a function of turnrate *and* speed)just with longer pauses in between (while going forward)?
the requested/required (reqTurnAngle) turning angleSo what angle is turnInPlaceAngleLimit really compared with?
both spellings contain an 'e', just in different places (but yes)Isn't it spelled without "e"?
Re: What is turninplaceanglelimit for and is it in 87.0?
i guess mostly by going slower? seeing as units should already be at maxspeed most of the time?no, by going faster (turning radius is a function of turnrate *and* speed)
So units look ahead and slow down before turns? Wouldnt it be better if "the turning that actually happens" slowed them?the requested/required (reqTurnAngle) turning angle
Like
deltaHeading = currentHeading-oldHeading
slowDown = some function of deltaHeading
I thought about it and looked at stuff but now I am confused and don't even know what to ask.
Though I see why pathing always breaks. *bada-bom-szhh*
Re: What is turninplaceanglelimit for and is it in 87.0?
yes, or that (lower speed decreases the radius)i guess mostly by going slower? seeing as units should already be at maxspeed most of the time?
nononoSo units look ahead and slow down before turns?
they do (because turnSpeed *= (maxTurnAngle / reqTurnAngle); forces them to)Wouldnt it be better if "the turning that actually happens" slowed them?
stare at the two targetSpeed = ... turnSpeed ... lines until you see.slowDown = some function of deltaHeading
you have reached the beginning phase of enlightenmentI thought about it and looked at stuff but now I am confused and don't even know what to ask.
sadly getting complicated things right is harder than getting them wrong.Though I see why pathing always breaks