Ok so look at my code:
Vector3 input = new Vector3 (Input.GetAxisRaw (“Horizontal”), 0, Input.GetAxisRaw (“Vertical”));
Vector3 direction = input.normalized
What does .normalized mean, what does it do, it it necessary for movement on objects?
What is transform.Translate, what does it do and how does it work?
If I want to make my game multiplayer, do I need to pay in anyway?
I will ask more questions soon.
Vector3.normalized
Unity Scripting Reference Entry
Wikipedia Entry for Unit Vector (aka Normalized Vector)
It depends on how you want to handle movement. It isn’t a requirement, but it can be a useful tool.
Transform.Translate
Unity Scripting Reference Entry
I forgot to say that I want people themselves to explain it to me in deep detail, it’s hard to understand the guides because they’re just so complicated, and instead I want people to explain it to me in a simple way.
Okay, first of all… the response you were looking for towards @DanielQuick was “Thank you.” A little courtesy goes a long way.
Second, do not simply bump threads. Especially not ones that you last posted in 2.5 hours previously. You appear to do this a lot. The people who answer questions on these forums are normal people who work their regular jobs and spend time with their families. And you know, sleep and stuff. We’ll get to your question when we can, regardless of whether it’s at the top of the page or not. In fact, seeing someone demand attention with a “bump” makes us feel less inclined to care.
Third, if you find your question is going unanswered, instead of bumping consider that you might need to provide more detail so people can provide a meaningful answer. Or, people might not be responding because your question could be answered with a simple Google search.
Fourth, the API documentation does have some iffy areas, but the entry on Vector3.normalized is pretty straightforward. Did you actually read the link that was shared? If you don’t understand what any of that means, it sounds like you’re in too deep and need to go back and learn the basics again.
Lastly, if you’re not sure what .normalized is, why are you using it? Is it from a tutorial you’re doing or something? And if so, does the tutorial not explain why you’re using it? You should never just be pasting code into your project without knowing what it does.
Welcome to programming. This is one reason why not everyone on these forums is a programmer. You need a certain mindset, you need an understanding of mathematics, etc and some people simply cannot reach that point in a reasonable span of time. So they become artists, they become level designers, and so on.
It’s a mathematical term. If you absolutely must have the math behind it you can check the link below, but it basically sets the length of the vector to 1. It’s primarily used to determine the direction of a vector like in the example code you gave.
http://stackoverflow.com/questions/11644356/what-does-it-mean-to-normalize-a-value/11644561#11644561
Is it necessary for movement? Yes, if you want to know the direction the player is moving the controller.
This one is explained by the link provided earlier.
Before the artists come at us with pitchforks and torches, some people are already very talented designers/artists and don’t have an interest in programming. I think the most successful people in any position recognize their strengths and weaknesses, focus on their strengths, while working with people who compensate for their own weaknesses.
Writing good code is hard. Making good art is hard. Creating good music and sound is hard. Designing good gameplay is hard. If it were easy, literally everyone would be doing it (instead of the current figurative everyone that’s doing it…)
1.Yeah, but he didn’t help me because I allready read that and i’m impatient right now to get answers, i hate when I have to wait for hours just to get a simple question answered.
2.Like I have said, impatience, and impatience = get things done quicker = learn better = make my game.
3.Maybe I will do that.
I don’t see why people wouldn’t answer, this is a questions thread.
4.Look, let me explain my problem in a simple way: the Unity API explains complicated things… with complicated things.
I have to look 100 other things up in order to understand this one thing! when a person here can just explain it simply in a few minutes.
Ok, even if a vector has a lot of complicated math going into it, doesn’t mean you cannot explain it to me in a simple way,
yes I need an understanding of mathematics to learn this, but not as much as you think.
“It’s a mathematical term. If you absolutely must have the math behind it you can check the link below, but it basically sets the length of the vector to 1. It’s primarily used to determine the direction of a vector like in the example code you gave.”
Ok you’re missing a point here, I allready read the Unity API, but what I want to know is WHY setting a vector’s length to 1 causes movement in Unity.
And guys, all I need is a simple and understandable explanation to my questions. For a beginner in Algebra to understand a complicated equation, he just needs to understand the basic 2 sides, same with my questions, if you show me the basics of it in a simple way, I will then be able to understand the more complicated parts.
It doesn’t, it gives you a normalized direction which you may or may not want to use as a direction to move in.
Transform.Translate performs the movement, as explained in the Scripting Reference linked above.
Let’s say you want to move towards a target at a specific speed.
The vector you want to travel is TargetPosition - ThisPosition.
If you Translated that amount, you would arrive at the destination immediately. No good.
If you normalized that amount, you have the direction you want to move in.
Now you are free to multiply the direction by the speed you want to travel to find how far you want to move over 1 second.
Multiply that value by the deltaTime to find how far you should travel in a frame.
Translate by that last value.
Wow, that was extremely helpful, you definitely deserve a thank you ![]()
That was a simple and understandable explanation for a beginner programmer to understand. See, instead of reading all that which would take about an hour or more for me to understand, it only took your reply a minute to make me understand, now I think you guys see my point.
One day you will be on the other side, and you will feel regret.
Respect your peers, no matter their advice.
This forum has a like button next to each comment ![]()
In general we are more than happy to help others getting started, though you have a much better chance of that with a good attitude and etiquette. Your thread title for example (“Answer my questions”) is phrased as an order and nobody likes being ordered around. Most of your writing follows a similar theme.
Remember, I said I’m impatient to learn all this, once I learn the simple stuff, i can learn the complicated stuff, not the other way around which is of course hard.Of course when I know all the basics, I will want to be on the other side.
Yes, I apologize for being like that, but my impatience is high when I want to learn something.
Ok just to get it straight, normalizing a vector “takes the magnitude(length) out of it”, leaving you with just a direction, right?
for example:
Vector: 10 units North
Direction: North
Magnitude: 10 units
So if I do this:
input = 10
input.normalized <— if I multiply this times deltaTime and “Translate” it, I will move 10 units in whatever amount of time the last frames were, correct or not?
An input of 10… I’ll assume 10 units ‘north’
No, you would move 1 unit/second north.
Because your attitude is chasing most of us off. We’re not paid to answer your questions.
Yes sorry I meant to say that, i put 10 instead.
Explain why.
Another question was added, please answer it thank you.