I now notice why?/how? you love maths... but...
Forum rules
Quicklinks: Download & Information • Create a new topic asking for help • All terraintype codes
Quicklinks: Download & Information • Create a new topic asking for help • All terraintype codes
- manstie
- Posts: 310
- Joined: Wed Jun 17, 2009 9:27 am
- Account: manstie
- Location: Perth, Australia
- Contact:
I now notice why?/how? you love maths... but...
Hello...
Just came back to post something...
I'm recently learning about using Sine, Cosine and Tangent, but I have no idea where people would use it in life... I guess I was partially wrong
I noticed that you used *Cos(0.017453278*GetUnitFacing(u) and *Sin(0.017453278*GetUnitFacing
I'd like to know, how did you get 0.017453278?
I'd also like to know what is Atan2? (In "Information for Dummies" talk)
And is there a way to increase the turn speed of your system (It won't turn any faster from like... 0.5 turning speed to 1 turning speed).
Just came back to post something...
I'm recently learning about using Sine, Cosine and Tangent, but I have no idea where people would use it in life... I guess I was partially wrong
I noticed that you used *Cos(0.017453278*GetUnitFacing(u) and *Sin(0.017453278*GetUnitFacing
I'd like to know, how did you get 0.017453278?
I'd also like to know what is Atan2? (In "Information for Dummies" talk)
And is there a way to increase the turn speed of your system (It won't turn any faster from like... 0.5 turning speed to 1 turning speed).
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: I now notice why?/how? you love maths... but...
0.017453278 is a magic constant: π/180 Pi/180 is used for converting degrees (°) to radians ().
Computer games need a lot of trigonometry for distance calculations, collision detection, etc. A secretary or a lawyer will never need Sine, Cosine, or Tangent, but a programmer needs this stuff for sure.
Atan2 is on wikipedia. The first paragraph tells you everything you need to know about it. (takes two arguments, x and y, then in a coordinate system calculates the angle between the X axis and the (x;y) point and returns it in radians. I'd draw your a picture, but I'm 5$ not 10$ motivated 15$ enough 20$.
I have nothing on how to make them turn faster. I think all sliding maps have this problem. If you know of any map (protection isn't a problem) that has quicker turns on ice, I'd love to steal that and implement it into my system as a new variable (udg_TurningSpeed).
Computer games need a lot of trigonometry for distance calculations, collision detection, etc. A secretary or a lawyer will never need Sine, Cosine, or Tangent, but a programmer needs this stuff for sure.
Atan2 is on wikipedia. The first paragraph tells you everything you need to know about it. (takes two arguments, x and y, then in a coordinate system calculates the angle between the X axis and the (x;y) point and returns it in radians. I'd draw your a picture, but I'm 5$ not 10$ motivated 15$ enough 20$.
I have nothing on how to make them turn faster. I think all sliding maps have this problem. If you know of any map (protection isn't a problem) that has quicker turns on ice, I'd love to steal that and implement it into my system as a new variable (udg_TurningSpeed).
Re: I now notice why?/how? you love maths... but...
the most thing a lot of warcraft map makers have in common is MATH!
it seems it's an addiction as they make systems and custom abilities....i still don't know how to use JASS, but i am able to make JASS spells using gui but with a lot of equations...
i still don't know how to use the other 'Math - ' actions.....
can't you try something like " call SetUnitFacing( GetEnumUnit(), ( GetUnitFacing(GetEnumUnit()) + udg_TurningSpeed ))"?
i tried this thing on my own maps and worked okay, i just removed the "Timed" before "SetUnitFacing" and ", 0.00 " before "udg_TurningSpeed )) ", i've never tried using in on your map..... don't dare to.
it seems it's an addiction as they make systems and custom abilities....i still don't know how to use JASS, but i am able to make JASS spells using gui but with a lot of equations...
i still don't know how to use the other 'Math - ' actions.....
can't you try something like " call SetUnitFacing( GetEnumUnit(), ( GetUnitFacing(GetEnumUnit()) + udg_TurningSpeed ))"?
i tried this thing on my own maps and worked okay, i just removed the "Timed" before "SetUnitFacing" and ", 0.00 " before "udg_TurningSpeed )) ", i've never tried using in on your map..... don't dare to.
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: I now notice why?/how? you love maths... but...
I am already using that*, but it is no good.
*=call SetUnitFacing(u,57.295828*Atan2(GetLocationY(p)-y,GetLocationX(p)-x))
Btw what you have there would spin the unit like crazy, making the player feel slightly out of control
*=call SetUnitFacing(u,57.295828*Atan2(GetLocationY(p)-y,GetLocationX(p)-x))
Btw what you have there would spin the unit like crazy, making the player feel slightly out of control
- manstie
- Posts: 310
- Joined: Wed Jun 17, 2009 9:27 am
- Account: manstie
- Location: Perth, Australia
- Contact:
Re: I now notice why?/how? you love maths... but...
Yeah...
A map with a faster turn speed (I think, pretty sure the triggers make them turn a bit faster) is Area of Ice Escape 4. (I noticed in Area of Ice Escape 1 that the turn speed wasn't as fast as #4.)
I was thinking - Wouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?
I just thought of another thing - Maybe you could do a custom thing to unit facing degreese, and don't use that at all, but use a real value to replace Unit facing degreese, and just make the unit face degreese for show
A map with a faster turn speed (I think, pretty sure the triggers make them turn a bit faster) is Area of Ice Escape 4. (I noticed in Area of Ice Escape 1 that the turn speed wasn't as fast as #4.)
I was thinking - Wouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?
I just thought of another thing - Maybe you could do a custom thing to unit facing degreese, and don't use that at all, but use a real value to replace Unit facing degreese, and just make the unit face degreese for show
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: I now notice why?/how? you love maths... but...
You make absolutely no sense. SetUnitFacing is the function that sets the unit's facing "instantly". If only it did...
Re: I now notice why?/how? you love maths... but...
i think he meant by as you order a unit to move(slide) to a point, instantly changes the unit facing from the unit's position to the point
or
it is just what i said
or
maybe just by changing the unit's turning speed, i remembered you(3ICE) said that your Steer trigger is somehow based on the unit's turning speed
and at the last sentence, why make a custom trigger for unit's facing degrees that we don't use at all? unit's facing degrees uses Real
or
it is just what i said
or
i just think of this asWouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?
,Would it be possible
maybe just by changing the unit's turning speed, i remembered you(3ICE) said that your Steer trigger is somehow based on the unit's turning speed
and at the last sentence, why make a custom trigger for unit's facing degrees that we don't use at all? unit's facing degrees uses Real
- manstie
- Posts: 310
- Joined: Wed Jun 17, 2009 9:27 am
- Account: manstie
- Location: Perth, Australia
- Contact:
Re: I now notice why?/how? you love maths... but...
But with that real, you can't set it instantly to something else, it eases into the direction. So if you make a custom variable and change that, it's instant.samtre wrote:i think he meant by as you order a unit to move(slide) to a point, instantly changes the unit facing from the unit's position to the point
or
it is just what i said
or
i just think of this asWouldn't it be impossible to change the turn speed without a trigger that sets a unit's facing point instantly?,Would it be possible
maybe just by changing the unit's turning speed, i remembered you(3ICE) said that your Steer trigger is somehow based on the unit's turning speed
and at the last sentence, why make a custom trigger for unit's facing degrees that we don't use at all? unit's facing degrees uses Real
Re: I now notice why?/how? you love maths... but...
How about Unit - Move Unit instantly and Face Angle?
this might be dumb.........
you can't use any abilities though.
this might be dumb.........
you can't use any abilities though.
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: I now notice why?/how? you love maths... but...
This is making less and less sense the deeper we go into it. Especially because you guys keep suggesting things I already use.
EDIT: It would have been great to have this discussion in two separate topics:
I now notice why?/how? you love maths and How to make sliding units turn faster?
EDIT: It would have been great to have this discussion in two separate topics:
I now notice why?/how? you love maths and How to make sliding units turn faster?
Who is online
Users browsing this forum: No registered users and 8 guests