What is turninplaceanglelimit for and is it in 87.0?

What is turninplaceanglelimit for and is it in 87.0?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

What is turninplaceanglelimit for and is it in 87.0?

Post by Google_Frog »

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.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by Google_Frog »

It still looks like the tag has no effect in 88.0.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by Google_Frog »

That was not helpful. What is the angle range of this tag?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by jK »

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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by knorke »

I did not really understand it either.

Code: Select all

if (reqTurnAngle > ud->turnInPlaceAngleLimit) {
targetSpeed = turnSpeed;
hm ok.
so reqTurnAngle is

Code: Select all

const float reqTurnAngle = math::fabs(180.0f * (owner->heading - wantedHeading) / SHORTINT_MAXVALUE);
With 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)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by Kloot »

With the wantedHeading I am lost.
imagine how units feel
I thought spring units can only turn at always the same rate.
yes
So to drive a bigger circle units still turn at the same amount per frame
yes
just with longer pauses in between (while going forward)?
no, by going faster (turning radius is a function of turnrate *and* speed)
So what angle is turnInPlaceAngleLimit really compared with?
the requested/required (reqTurnAngle) turning angle
Isn't it spelled without "e"?
both spellings contain an 'e', just in different places (but yes)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by knorke »

no, by going faster (turning radius is a function of turnrate *and* speed)
i guess mostly by going slower? seeing as units should already be at maxspeed most of the time?
the requested/required (reqTurnAngle) turning angle
So units look ahead and slow down before turns? Wouldnt it be better if "the turning that actually happens" slowed them?
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*
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: What is turninplaceanglelimit for and is it in 87.0?

Post by Kloot »

i guess mostly by going slower? seeing as units should already be at maxspeed most of the time?
yes, or that (lower speed decreases the radius)
So units look ahead and slow down before turns?
nonono
Wouldnt it be better if "the turning that actually happens" slowed them?
they do (because turnSpeed *= (maxTurnAngle / reqTurnAngle); forces them to)
slowDown = some function of deltaHeading
stare at the two targetSpeed = ... turnSpeed ... lines until you see.
I thought about it and looked at stuff but now I am confused and don't even know what to ask.
you have reached the beginning phase of enlightenment
Though I see why pathing always breaks
sadly getting complicated things right is harder than getting them wrong.
Post Reply

Return to “Game Development”