Yes i am familliar to these functions in Geometry but what purpose do they serve in unity? Soh Cah Toa
When 3d applications are implemented, there are a lot of geometrical problems that need to be solved. For some of them, it is straight forward to use trigonometric functions. For me the question is more, why should they not be needed in Unity?
If the use of sine, cosine, and tangent functions in geometry/trigonometry isn't obvious, then you're unlikely to understand the more detailed explanation. You most likely would want to start with math books covering those two fields or possibly even some classes.
Really guy? What do you mean a thorough explanation of it? It's freaking trig dude! You said you are familiar with them... how do you NOT know what they're useful for? Go back to your freshman highschool math class if you don't know.
Your logic is nonsensical - what explanation would be required? You could pose the same question for any method provided but for what purpose. To me it makes as much sense as asking about the marital status of the number 5. Here is the concise explanation: They are methods that are provided to be used in instances where they are useful. Here are two examples: Distribute/Plot points or objects in a circle Create a wave effect
No need to bash anyone here... We all learned some basic trigonometry and we all forgot some! Personally, I used a bunch of Trigonometry when I do some 2D AI stuff, like: -Finding the closest enemy -Rotating forwards something (in 3D, you can just use LookAt) Here's a useful link about the OP question: http://www.raywenderlich.com/35866/trigonometry-for-game-programming-part-1
I agree that the bashing goes too far. Still, I will never understand why someone doesn't use Google before asking questions here.
He started off by stating he understood the purpose of sine, cosine, and tangent in math, but then asked how they're used in Unity as if they are somehow different. Additionally his second post came off a bit arrogant. Are you really surprised he was getting those responses?
Without going off on a tangent, I'd just like to add that I use sine and cosine all the time in Unity3D. They really help me get a round.
I am really stunned by some of the bashing on this thread i said i knew trig and i also mentioned i use them in geometry Ryiah- He started off by stating he understood the purpose of sine, cosine, and tangent in math, but then asked how they're used in Unity as if they are somehow different. Additionally his second post came off a bit arrogant. Are you really surprised he was getting those responses? First i just want to say what is there to be arrogant about? even though i said i am familliar as in "that one guy seems familliar" (i did not say understood) regardless the functions in geometry should not lead one to assume that i have a high level of understanding in this category i only use them to find the sides of a triangle. If you can't even answer the question at least post a link to a good source of info. Thanks to sluice,blizzy,Kurt Ddekker for not bashing. Best answer goes to - sluice, thanks for the link man. For that one guy who said my logic is nonsensical and provided these 2 explanations Distribute/Plot points or objects in a circle Create a wave effect Now you know why i asked for a thorough explanation. This definition is completely random the fact that you questioned my logic strikes me as offensive. Anyone with life experience knows that people learn at different paces and do not think alike. You might be talking to a person who will become a great programmer one day, no matter what do not use negative adjectives to describe the man or woman or their ownership please.
They serve the same purposes in Unity that they do in math. You were asking for a thorough explanation yet the explanation was in the very math you claimed to have understood. While I suppose it is possible to learn a subject yet be unaware of its application, the books I used to learn the subjects in school had real life examples of the math in use. Your second post came off feeling a bit arrogant even if you hadn't intended it. It felt as if you were stating, "I'll make the decision as to whether or not they are useful in Unity".
Perhaps it wasn't your intention, but this post struck me as arrogant as well when I first read it. Although the question was more or less answered, for future reference it would be more helpful to ask a question in terms of: "I was thinking of solving problem X with trigonometry, do you guys think I could apply it or should I tackle the problem X another way?" I'm sure that way more people would be eager to assist you. I've read somewhere (can't remember link sorry) an interesting thing about sin/cos is that, when you draw it in complex plane it is actually a spiral, not a circle as one might thought. Maybe that can provide you a better insight how to use it. Good luck!
Thanks for the reply fajlworks i would have done your suggestion but i was not trying to solve a specific problem but that probably would not have mislead many.
That did come off arrogant don't blame you for that. To be honest i do not know what i was attempting to say either. That was quite uninsightful(if that is a word) of me, and yes though i knew about it from geometry. One can only ask what is it that is so unclear to your needs? and yes you are right i did'nt know its application to Unity3D. -- You might be rich,intellectual,strong,beautiful but all that isn't a viable perquisite compared to the ones that give to the ones that give to others,educate others, save others,make others feel beautiful in their own individuality.
I'm sorry if you took offence but I was speaking with reason - the line of 'questioning' is indeed nonsensical to me, is that an overly offensive thing to say? I'm just saying your question doesn't really make sense. Read my reply again assuming I'm just a logical nerd who also tried to add a little humour (marital status) and it should not come across too offensive. I think you took more offence than necessary from my comment due to the tone this whole thread took. It's nonsensical since it's purpose is the same - it's for 'geometry' as the first reply indicated. I read your question like this bad analogy: "I'm familiar with how wheels turn to make a car move, but what's the purpose of having them on a truck?" And your: Came of somewhat arrogant (as has been covered). It reads as if you're saying "I need to decide if they made a mistake including these in Unity and I need a thorough explanation to convince me otherwise". I suspect that is not what you were trying to say. Absolutely - like I mentioned before, I think you took an unnecessary amount of offence from my post - sorry for that - if you look through my posts you'll see that over 90% will be just me offering help/assistance to others, I'm like that, I take joy from helping others, not attacking them - it assists my own learning. I encourage you to keep learning and engaging in this forum, do not let this thread and its tone etc effect you - I think it was mostly due to poor interpretation of your intentions.
Perhaps @matriXcel should of format his question more on how/when is it best to use Trigonometry in game design?. I think it's a really interesting subject! I'm sure there are interesting scenarios where most of us (me included) wouldn't think of using trigonometry while it would actually be a really good way of fixing that problem!
I agree, it is an interesting subject. But if it was meant like that, it doesn't fit into this section, but would need to be in General Discussion. The scripting section is not for chit-chat.
Just created it: http://forum.unity3d.com/threads/how-when-do-you-use-trigonometry-in-game-design.329280/ So whoever interested, come and chip in!
There's a series of posts on the Wolfire blog that you might find interesting, too. Functions like this are used for all kinds of things. In my game I use them for spawning objects on a circle around a center for example, or for finding out if a target is left or right of an object. Using Unity, you usually don't have to go down to this basic math level that Mathf.Sin/Cos/Tan etc. represent since Unity provides higher-level functions for convenience.
Thanks for all the posts i am getting some real good juice out of this. I really love the application of math in programming. I would also love some book recommendations on this in c# better yet Unity3D c# anything from rotations(especially rotations i still do not know what quaternions are) to positioning and any math related stuff.
When i read your post your tone seemed to me like you described the question as making no sense whatsoever(nonsensical logic), But all that is behind us so we should not ponder on such silly arguements.
Good place to start, if you haven't already: http://unity3d.com/learn/tutorials/modules/beginner/scripting http://unity3d.com/learn/tutorials/modules/intermediate/scripting/quaternions
I do not like the unity modules they are too short and brief but good suggestion i would rather watch other tutorials on youtube.
Hm, that's tough. There are a gazillion books on Linear Algebra, Trigonometry etc. out there, but not specifically for C#. If you find a C# book it won't deal with those topics, since low level stuff like this is usually coded in lower level languages. There are Unity/C# books but those should be quickly outdated - and if they are not they are too general. That being said, the only thing that I can think of right now that is about low level gaming math and C# is Jamie King's YouTube series on the subject. There you will find explanations of basic C# concepts, C# usage patterns, low level math etc.
Yes i am familliar with Jamie King's series as well as jonathan weinberger,awfulmedia,acem003 etc. but i will look into it with more insight.
nah i will just keep learning c# with unity until i come across a problem that involves such math then i will look into it there is no point getting ahead of myself now.
No probs, fair call - do note that linear algebra is an extremely useful tool for games programming in general - it'll equip you with a whole new arsenal of ways to solve things. The problem with waiting until you have a problem that needs it is that you won't know the solution/method exists and will not know that is the time to learn (if I'm making any sense).