hey i couldnt see wat code you wrote for A and D, it just kind of swiped to another part of your vid and then your video of yourself was blocking it. wondering if you could just write wa you put in the code
@infinteammoinc i have done exactly as what you have put in your Javascript and done exactly the same on everything... got one slight problem, when I go to move i only move 1 space forward rather than moving around all the time freely like you do, where have i gone wrong? BTW im completely new to this so im a noob atm! :P
Perfect tutorial. But what if i want to use mouse to change the angles and keyboard just to transform positions. Like a FPS game. I need a hint to google it :)
hey man, love the videos so far. this doesnt have to do with this video in particular but i need help with a script for me to pick up something with a RigidBody (i.e. a cube) and be able to pick it up then push it out. i almost had it but i did something wrong and crashed unity and i was using Raycasters on Physics and i just need a propper code so when i left click it will pick it up and when i right click it will push it forward.
@Hamgamgo I realize this has been a while, but not. That is not possible. And the editor is always clamped at a max of 60 frames/seconds, but even if you "publish" the game and run it as an .exe, that is not possible.
So I wrote it out as shown, but I was hoping to move continuously by holding down whatever button I assign and at the moment, whenever I hold a button it only moves once. How would I change that? Thanks.
i made the script and it is completly right, the speed is right and the input is all right, but i cant move up down left or right, and yes i did add the letters for the keys to move. Please Help
Hi! I'm following our tutorial...It is really strange..everithing is working fine except that the forward movement...I press "w" but anything happens. here a piece of my script:
hey can anyone please help i got these errors on my script and i don't know what to do. " Assets/movement.js(23,33): BCE0034: Expressions in statements must only be executed for their side-effects. " what does that mean i checked the script and rechecked, help would be nice. someone tell me what i messed up on this next comment.
This is really frustrating, i have done the same things like you but when i try to move NOTHING happens... I have checked the Scrupt 20 times and I havnt done any mistakes in it.. wtf is the problem? :S
@nedbear1970 i know right, i have the same thing to, maybe its he has an older version, i got the 3.3 version of unity so i think the scripting works differently
I'm following them and wrote the script etc..EVERYTHING works except for the Forward button ("w"). The strange thing is that if i change it in the input mapping to any other key ("e", "r", "t", for istance) it works great! But not with "w"...what am i doing wrong?
@narutolll hey naruto, first import the standard assets(if mac) or the scripts package(if windows), then find the 'MouseLook' script and put it in your camera. =)
Anyone ever notice how the first tutorial for something can have a huge amount of views.. but no, not once you get to the second video! seriously... can people not commit?
I'm 14 and I'm just about to go into 9th grade so am I supposed to know how to script or am I supposed to learn this in high school. Where do I learn it?
@SupermanSmallville1 I am, too.Well... scripting isn't exactly something you learn in an average school. You might be able to go to a college or university of some sort that offers that as a class, or an elective. That's not going to be your best bet at learning to script.Just started this tutorial a while ago, and if you follow along,you will get a bit of understanding of what you are doing.You can also look into some other languages after doing some research to see which one you think is easy
Hmm, i have copied the code exactly to be sure, but the CPU seems to expect "(" instead pf "{" at the entry line for the coding, and "EOF" (end of function?) instead of "}" Any help would be appreciated
@gamercritic101 look in the project setting under input again, where he showed setting up Forward Backward ect... make sure you have the "backwards" input in however you want it called. It's disappeared for me before so check that first.
When i push on Forward it only does it one time except if i push again.. i want that it refreshes the key like you . If you keep on pushing it keeps going forward.
When i try to run my game i get this error message:
Assets/NewBehaviourScript.js(8,35): BCE0051: Operator '+' cannot be used with a left hand side of type 'float' and a right hand side of type 'UnityEngine.Vector3'.
@tarrizzzzzzzzz thanks lol , i was VERY new to scripting then, thankyou for the answer though, and when i saw *turnSpeed* i thought that meant something like ' this script uses the variable named turnspeed, therefore you have to put that every time you use it ' you should look at almost everything in detail for one or two tutorials so this doesnt happen :D
if you want it to behave like a real air plane, you would want it to rotate on it's z axes, and then pull up on the x axes to actually turn (which would to us seem like turning on the y axes)
btw, for pitching down, use my code, but replace ("up") with ("down") and += with -=
PS: you can use any word instead of up and down, for example UpArrowKey, or something else, either way you have to specify the actual button in the input.
@jordannw2010 I need to stop doing this, but I wrote a short script for you... you CAN NOT use vertical and horizontal, as you need to define which way it should turn...
sorry to bother you like this, but to be fair, you said help :)
there's no errors in mine, but when i press D for right, the camera moves right and backward, whereas when i press A for left, it pans like it should. any idea what this might be?
@CrackpotWeevil My guess would be a typo. Because the human brain is generally pretty shoddy, you'll miss a lot of mistakes even if you think you're looking closely. Keep in mind that the distinction between upper case and lower case matters. i.e. Typing Transform.position vs. transform.position = two completely different things.
I was copying you cuz I am new to this but near the start I couldn't see the bottom line of the scripting and when I wanted to test it the game said there was a compiler error, thanks any way u have helped me alot and i understand the interface now.
@forjustice You're not going to get a lot of help if you don't provide specifics. i.e. What error messages did you get? My guess is you have a typo somewhere else in your code, even if you think you can't see it. I'd try rewriting parts of it and see if you get the same errors.
can u send me these scripts by email or somthing? i dont wanna write em down on paper... and should i stop trying to use Unity3d because i dont know java language???
I got problem with my script. It says "Assets/Bob.js(19,72): BCE0051: Operator '*' cannot be used with a left hand side of type 'UnityEngine.Vector3' and a right hand side of type 'System.Type'." and "Assets/Bob.js(19,79): BCE0005: Unknown identifier: 'deltaTime'." What should I do? I am using Windows Vista. Is it different from Mac?
When i hold W it walking forward and when i hold S it walking forward to. When i hold d it rotate Right when i hold A it rotate Right to. What have i did wrong?
@diggygoggy "geeks" like him make the games you play, program the websites and softwares you use, and made the computer you are sitting right know, have a little respect if it was an insult
@infiniteammoinc dude i made this first person controller script by watching your vid but when i try it out it doesnt wor can you help me? ill post my script in the next comment and anybody is free to use it }
dude i made this first person controller script by watching your vid but when i try it out it doesnt wor can you help me? ill post my script in the next comment and anybody is free to use it }
Thanks Guy. Awesome tutorials. I found that 'transform.eulerAngles.y += x amount;' works just fine. Don't really get the point of turn speed even though it's cool I guess. But anyway, this tutorial helped me out heaps so thanks!
If you don't know what is a variable this video is totally useless man!!
Obviously this is a reference video for those who already know programing and unity also, but you then teach about the basic Ui commands in unity!
This tutorial is a mess, but useful for someone like me, i don't want to be rude, just i want to make a constructive criticism, you have to define the tutorial goal, the target audience and then restrict the topics to that target.
@sticksanity Compare your code to that in the video, and see if you can notice any differences. With programming, if you can't tell what's wrong right away, it's probably something subtle. Then again, it's quite possible that it's really obvious and you're just not seeing it yet. :) (happens to everyone)
@sticksanity you must have used transform.position for "A" and "D" which is wrong, because when you push A and D you want it to "turn"(change angles/rotate), so you should use transform.eulerAngles.blah blah blah...
Cool! I am looking into Unity, and it looks really cool. The scripts and UI remind me a bit of Maya, but better, WAY better. I would say the only problem with this tutorial is that your face gets in front of the code quite a lot.
Yup. Was using GetButtonDown. Allowed it to seep in from code commented out in first part of the tut. Thank you very much for your reply! I think I'm starting to have fun learning to code :~).
Now, going to work on the jump so the character goes up and comes back down smoothly. Obviously, GetButtonDown won't do the trick. Have to learn about gravity, hehe. I do have code I can coopt and learn from in the Unity documentation. Going through the 3d platformer tut now. Thx again!!! :~)
Everything seems to be working correctly, except that in your vid it seems like you're getting continuous movement while holding a button, whereas I get one movement with each button press. Are you having to repeatedly press a button to get continued movement?
I attempted changing the "if" statements with "while" thinking it would work, but no luck so far. I'll keep working on it, but feedback appreciated ~ and thanks again for the tut :~)
You may be using GetButtonDown instead of GetButton? Get ButtonDown only returns true when the button goes down. After that it returns false. GetButton returns true if the button is down, false if it's not.
You don't need to use a while loop. (Update gets called every frame from the main loop)
I get a error saying:
Assets/Movment.js(10,31): BCE0020: An instance of type 'UnityEngine.Transform' is required to access non static member 'position'.
GmanDevelopment 3 days ago
OMG this looks god damn hard!
megaflybye 6 days ago
I cant make a javascript because i dont have the project tab that you have...
MinecraftishPerson 6 days ago
@MinecraftishPerson Right click on any tab, hover over 'Add Tab', and click on project :)
ryman297 6 days ago
it say 'Unknown Idientifier : 'Backward'..... please help me !!
4kir99 1 week ago
nvm I got it
1HiddenChaos1 1 month ago
hey i couldnt see wat code you wrote for A and D, it just kind of swiped to another part of your vid and then your video of yourself was blocking it. wondering if you could just write wa you put in the code
Thanks
1HiddenChaos1 1 month ago
Not very experienced in code, but im guessing your using C# language right?
ZachsEdits 1 month ago in playlist Uploaded videos
@ZachsEdits Java Script, check out codeacademy . com for tutorials
kldde242 1 week ago
Assets/bob.js(18,39): BCE0050: Operator '-' cannot be used with an expression of type 'error'.
zerak9494 1 month ago
@zerak9494 O_O
supersushi269 2 weeks ago
Comment removed
KILLERxMONKEYxGAMING 1 month ago
nevermind sorted it! :P
RobbieDee2k12 1 month ago
since it's java why is it var instead of int or double or string or whatever
MrDiablo5222 1 month ago
@MrDiablo5222 this is javascript, they are not the same
andersmelen 3 weeks ago
@andersmelen It's painful when people think they are the same.
thetnetennba 2 weeks ago in playlist Unity Tutorials by Infinite Ammo
@MrDiablo5222 its not Java, its Java Script
kldde242 1 week ago
This has been flagged as spam show
@infinteammoinc i have done exactly as what you have put in your Javascript and done exactly the same on everything... got one slight problem, when I go to move i only move 1 space forward rather than moving around all the time freely like you do, where have i gone wrong? BTW im completely new to this so im a noob atm! :P
RobbieDee2k12 1 month ago
Comment removed
RobbieDee2k12 1 month ago
Comment removed
RobbieDee2k12 1 month ago
Nice video, you're not only teaching unity but trying to explain programming concepts along the way. That's a mammoth task. Good luck!
Mrfroth 1 month ago
Perfect tutorial. But what if i want to use mouse to change the angles and keyboard just to transform positions. Like a FPS game. I need a hint to google it :)
jonuroral 1 month ago
@jonuroral Hmmm, YT is being a bit of a PITA WRT replying to you, so I guess just go here: pastebin DOT com/RhUbenaP
truevox 1 month ago
@truevox Do'h! I forgot, in my script, what you want "a" to be is "q", and "e" is what you'd want "d" to be. Sorry!
truevox 1 month ago
@jonuroral Oh, and I'm still learning Unity3d myself, so please forgive me if anything offered at the below link is wrong/not clear enough.
truevox 1 month ago
@truevox np of course. after spending some time on google, I got what I need. thanks for the reply anyway.
jonuroral 1 month ago
know where i can get a character modeling software
thaDaniroy 1 month ago
@thaDaniroy Look up AutoDesk 3D Studio
MetrixCat 1 month ago
Everything works 100%, grate tutorial :)
Minecrafterman12 1 month ago
Comment removed
G3TH0STILE 2 months ago
for a RTS game If I add this to the main camera will it work?
Gh0StSecurity 3 months ago
Keys "w", "a", "s", "d" doesn't work in Mac. Why? It's okey when i use arrows - GetKey(KeyCode.UpArrow)
becasualle 3 months ago
NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs)
Firstscript.Update () (at Assets/Firstscript.js:21)
Help? Please? It will not run, I get an error message at the bottom that says that.
BCK1D5 3 months ago
@BCK1D5 Looks like its trying to execute a Boo script when you have a javascript
raket94 3 months ago
hey man, love the videos so far. this doesnt have to do with this video in particular but i need help with a script for me to pick up something with a RigidBody (i.e. a cube) and be able to pick it up then push it out. i almost had it but i did something wrong and crashed unity and i was using Raycasters on Physics and i just need a propper code so when i left click it will pick it up and when i right click it will push it forward.
sharpndagger 4 months ago
my move code works only if i don't add the Time.deltaTime. Does this mean my computer is too fast for the code?
Hamgamgo 4 months ago
@Hamgamgo I realize this has been a while, but not. That is not possible. And the editor is always clamped at a max of 60 frames/seconds, but even if you "publish" the game and run it as an .exe, that is not possible.
tarrizzzzzzzzz 2 months ago
Comment removed
MultiVideogamelover 5 months ago in playlist More videos from infiniteammoinc
var moveSpeed:float = 1.0;
function Update ()
{ if(Input.GetButtonDown("Forward")) { transform.position += transform.right * moveSpeed * Time.deltaTime; } if(Input.GetButtonDown("Backward")) { transform.position -= transform.right * moveSpeed * Time.deltaTime; }
}
I have that, but I have to tap my buttons to get him to move forward, how can I make it so that I cna hold the buttons and have him move.
RPGking001 5 months ago
@RPGking001 change the Input.GetButtonDown to Input.GetButton
2112inuyasha 5 months ago
Okay, I used my imagination and did so I could move up and down. But how can I prevent myself from falling through blocks and "planes"?
Gondorius 5 months ago
So I wrote it out as shown, but I was hoping to move continuously by holding down whatever button I assign and at the moment, whenever I hold a button it only moves once. How would I change that? Thanks.
ImaJuggler 5 months ago
i made the script and it is completly right, the speed is right and the input is all right, but i cant move up down left or right, and yes i did add the letters for the keys to move. Please Help
aldonknows 5 months ago
Hi! I'm following our tutorial...It is really strange..everithing is working fine except that the forward movement...I press "w" but anything happens. here a piece of my script:
if(Input.GetButton("Forward")) { transform.position += transform.forward * objMoveSpeed * Time.deltaTime; }
Thanks and cheers
miticacal 5 months ago
you need to move your head.
mrbigglesworthkitty 6 months ago
hey can anyone please help i got these errors on my script and i don't know what to do. " Assets/movement.js(23,33): BCE0034: Expressions in statements must only be executed for their side-effects. " what does that mean i checked the script and rechecked, help would be nice. someone tell me what i messed up on this next comment.
penseremos 6 months ago
This is really frustrating, i have done the same things like you but when i try to move NOTHING happens... I have checked the Scrupt 20 times and I havnt done any mistakes in it.. wtf is the problem? :S
nedbear1970 6 months ago
@nedbear1970 i know right, i have the same thing to, maybe its he has an older version, i got the 3.3 version of unity so i think the scripting works differently
MultiVideogamelover 5 months ago in playlist More videos from infiniteammoinc
Comment removed
nimmy73 6 months ago
Hi! Thanks for your great tutorials!
I'm following them and wrote the script etc..EVERYTHING works except for the Forward button ("w"). The strange thing is that if i change it in the input mapping to any other key ("e", "r", "t", for istance) it works great! But not with "w"...what am i doing wrong?
no1r 7 months ago
@no1r Lets see your script so i can fix it for you man.
carfenaticman123 6 months ago
Do you know how to write a script that lets you aim the position of where the camera is facing with the mouse? Like in FPS games.
narutolll 7 months ago
@narutolll hey naruto, first import the standard assets(if mac) or the scripts package(if windows), then find the 'MouseLook' script and put it in your camera. =)
PcPlayer992 6 months ago
Yes, it's pronounced "Oiler." Euler was one of the world's greatest mathematicians. He practically invented math.
OniLinkPlus 7 months ago
@infiniteammoinc hey i want to creat a sprint movement so for multiple inputs at once would it be something like Input.GetButtonDown("Run" && "W"))
would that work or is there a proper way to do it.
BeyondTaking 7 months ago
@BeyondTaking Close, it'd be like
if (Input.GetButton("Run") && Input.GetButton("W"))
Check the Unity Script Reference for "Input" :)
infiniteammoinc 7 months ago
@infiniteammoinc do you have any tutorials on how to do that like mass physics ( a giant tower made of like planks that fall down)
mrcarbine541 6 months ago
@infiniteammoinc Im having speed problems what is the optimum movement speed for a game like GTA or WoW?
Runescapec99 4 months ago
hey, i have a question for you, how to make objects like wall or floor to be solid?
i've tried the mesh collider with rigidbody but it didn't work.please help me!!! ASAP
PcPlayer992 7 months ago
Comment removed
kallesbaksatt 7 months ago
Anyone ever notice how the first tutorial for something can have a huge amount of views.. but no, not once you get to the second video! seriously... can people not commit?
paytontheguy 8 months ago
Because I just got Unity today and I want to start making a movie before the summer ends.
SupermanSmallville1 8 months ago
I'm 14 and I'm just about to go into 9th grade so am I supposed to know how to script or am I supposed to learn this in high school. Where do I learn it?
SupermanSmallville1 8 months ago
@SupermanSmallville1 I am, too.Well... scripting isn't exactly something you learn in an average school. You might be able to go to a college or university of some sort that offers that as a class, or an elective. That's not going to be your best bet at learning to script.Just started this tutorial a while ago, and if you follow along,you will get a bit of understanding of what you are doing.You can also look into some other languages after doing some research to see which one you think is easy
XxJJxX13 7 months ago
Comment removed
SupermanSmallville1 8 months ago
Comment removed
SupermanSmallville1 8 months ago
genius....
humpe322 8 months ago
Hmm, i have copied the code exactly to be sure, but the CPU seems to expect "(" instead pf "{" at the entry line for the coding, and "EOF" (end of function?) instead of "}" Any help would be appreciated
ShandyOzaki 8 months ago
@ShandyOzaki You have a typo. I'd try looking for mismatched { and }. If you can't figure out, I'd scrap it and try rewriting it.
infiniteammoinc 8 months ago 2
This has been flagged as spam show
HOW THE FUCK DO YOU FIX "input button backwards is not setup"!!!!!!!
taha22199507 8 months ago
HOW THE FUCK DO YOU FIX "input button backwards is not setup"!!!!!!!
gamercritic101 8 months ago
@gamercritic101 look in the project setting under input again, where he showed setting up Forward Backward ect... make sure you have the "backwards" input in however you want it called. It's disappeared for me before so check that first.
paytontheguy 8 months ago
can someone give me specific detail on how to change the input code so that it works with "wasd"?
gamercritic101 8 months ago
@gamercritic101 Read up on the Input Manager settings docs. Google search: "unity reference Input Manager"
infiniteammoinc 8 months ago
When i push on Forward it only does it one time except if i push again.. i want that it refreshes the key like you . If you keep on pushing it keeps going forward.
Nokkerground 8 months ago
Instead of Forward Backward Left Right I stuck with wasd and it dosent apear to working.
donov25 8 months ago
I have a pc, is there any way i can use this script editor? :p
tarrizzzzzzzzz 8 months ago
When i try to run my game i get this error message:
Assets/NewBehaviourScript.js(8,35): BCE0051: Operator '+' cannot be used with a left hand side of type 'float' and a right hand side of type 'UnityEngine.Vector3'.
hutzification 9 months ago
What Scripting engine are you useing ?like to write scripts in mine only bolds in blue yours does diffrent colors also.
merccc1 9 months ago
@merccc1 The scripting engine he is using is java. Maybe your using C Sharp
KunkoFilms2 8 months ago
@KunkoFilms2 i meen like the editor Im using built in one and I now see that you can modify it to show diffrent colors XD
merccc1 8 months ago
@KunkoFilms2 There is a distinction between Java and Javascript
Cordelles3 5 months ago
@Cordelles3 Yah but since unity doesn't have both java and javascript he will understand waht i mean.
KunkoFilms2 4 months ago
@merccc1 same here... you've got a PC, am I right?
tarrizzzzzzzzz 8 months ago
@merccc1 He probably has a different version of Unity. Mine is also different to his
Cordelles3 5 months ago
This has been flagged as spam show
var moveSpeed = 1.0;
var turnSpeed = 1.0;
function Update ()
{
if(Input.GetButton("Forward")) { transform.position += transform.forward * moveSpeed * Time.deltaTime; }
if(Input.GetButton("Backward")) { transform.position += transform.forward * -moveSpeed * Time.deltaTime; }
if(Input.GetButton("Left")) { transform.eulerAngles.y += -turnSpeed * Time.deltaTime; }
if(Input.GetButton("Right")) { transform.eulerAngles.y += turnSpeed * Time.deltaTime; }
}
Viola.
T7LI 9 months ago
bij mij werkt dat niet
(nederlands)
taha22199507 9 months ago
var moveSpeed = 1.0;
var turnSpeed = 1.0;
function Update ()
if(Input.GetButton("Horizontal")) { transform.position += transform.forward * moveSpeed * Time.deltaTime; }
if (Input.GetButton("Jump")) { transform.eulerAngles.x += turnSpeed * turnSpeed * Time.deltaTime; }
if(GetButton("Vertical"))
{ transform.eulerAngles.y += turnSpeed *turnSpeed * Time.deltaTime;
it wont work, im trying to make a spaceship.. help!
jordannw2010 9 months ago
@jordannw2010 there's so much wrong here... it might be helpfull to move the {
code...code..code
}
to seperate lines, like I did above...
secondly, you don't need semi colons within {}... that might be messing things up for you
and why do you multiply turnSpeed twice? turnSpeed squared? this is what you want if you want your spaceship/plane to pitch:
if(Input.GetButton("up"))
{ transform.eulerAngles.x += turnSpeed * Time.deltaTime;
}
the up is referring to the arrow key
tarrizzzzzzzzz 8 months ago
@tarrizzzzzzzzz thanks lol , i was VERY new to scripting then, thankyou for the answer though, and when i saw *turnSpeed* i thought that meant something like ' this script uses the variable named turnspeed, therefore you have to put that every time you use it ' you should look at almost everything in detail for one or two tutorials so this doesnt happen :D
jordannw2010 8 months ago
@jordannw2010 sorry for double posting, but:
if you want it to behave like a real air plane, you would want it to rotate on it's z axes, and then pull up on the x axes to actually turn (which would to us seem like turning on the y axes)
btw, for pitching down, use my code, but replace ("up") with ("down") and += with -=
PS: you can use any word instead of up and down, for example UpArrowKey, or something else, either way you have to specify the actual button in the input.
tarrizzzzzzzzz 8 months ago
@jordannw2010 alright, sorry for posting AGAIN, but i was wrong.. yes, you DO need semi colon withing {}... sorry :p
uhm, and you can apparently use vertical and horizontal, i didn't know that :p I'll start using that!
tarrizzzzzzzzz 8 months ago
@jordannw2010 I need to stop doing this, but I wrote a short script for you... you CAN NOT use vertical and horizontal, as you need to define which way it should turn...
sorry to bother you like this, but to be fair, you said help :)
tarrizzzzzzzzz 8 months ago
@tarrizzzzzzzzz you arent bothering me xD thanks for all the help i appreciate it
jordannw2010 8 months ago
there's no errors in mine, but when i press D for right, the camera moves right and backward, whereas when i press A for left, it pans like it should. any idea what this might be?
krazyates888 10 months ago
Assets/NewBehaviourScript.js(1,21): UCE0001: ';' expected. Insert a semicolon at the end.
I'm fairly new, and I tried to copy your script, but this is what I got... I don't know where to put the semi colon, could someone please help?
doubleagle100 10 months ago
how can you cpnect a script to a variable?
ethanizabunny 10 months ago
Comment removed
ethanizabunny 10 months ago
Comment removed
ethanizabunny 10 months ago
Can someone help me with these errors?
Assets/Script 1 - test.js(15,19): BCE0020: An instance of type 'UnityEngine.Transform' is required to access non static member 'position'.
Assets/Script 1 - test.js(23,37): BCE0005: Unknown identifier: 'speed'.
Assets/Script 1 - test.js(27,19): BCE0020: An instance of type 'UnityEngine.Transform' is required to access non static member 'eulerAngles'.
CrackpotWeevil 10 months ago
@CrackpotWeevil My guess would be a typo. Because the human brain is generally pretty shoddy, you'll miss a lot of mistakes even if you think you're looking closely. Keep in mind that the distinction between upper case and lower case matters. i.e. Typing Transform.position vs. transform.position = two completely different things.
infiniteammoinc 10 months ago
ur better than my teacher in uni
goldentiger05 10 months ago
ur beteer than my teacher in uni
goldentiger05 10 months ago
I was copying you cuz I am new to this but near the start I couldn't see the bottom line of the scripting and when I wanted to test it the game said there was a compiler error, thanks any way u have helped me alot and i understand the interface now.
HGRiot 10 months ago
i was wondering if my inpiuts just wont work
gandahome 10 months ago
my camera doesnt jump!
at the bottom of the screen it says unity exception: input button "jump" is not setup????
30unclejoe 11 months ago
My camera don't "jump" can you help me?
lolwoot666 11 months ago
My Unity is free and I have a little problem with using [+=] in this line
transform.position += transform.forward * moveSpeed * Time.deltaTime;
It's appear to be ERROR ?
So I use == instead and my camera didn't move - -
Help Me pls T T
forjustice 11 months ago
@forjustice You're not going to get a lot of help if you don't provide specifics. i.e. What error messages did you get? My guess is you have a typo somewhere else in your code, even if you think you can't see it. I'd try rewriting parts of it and see if you get the same errors.
infiniteammoinc 10 months ago
@forjustice you canot use == you need a singel = becouse == is for shekking your variables hopes thes helps
manenwolfddw 10 months ago
can someone tel me whats rong with this line
moveSpeed + 0.1;
sinmasterj 11 months ago
@sinmasterj moveSpeed += 0.1;
Tamloo1 11 months ago
thanks alot ive scripted before but dident know any of the functions or shit for this language
sinmasterj 11 months ago
Thank you dude
apsbox 1 year ago
can u send me these scripts by email or somthing? i dont wanna write em down on paper... and should i stop trying to use Unity3d because i dont know java language???
Azyzil 1 year ago
says its "expecting a EOF '}'"
Sikeman214 1 year ago
I got problem with my script. It says "Assets/Bob.js(19,72): BCE0051: Operator '*' cannot be used with a left hand side of type 'UnityEngine.Vector3' and a right hand side of type 'System.Type'." and "Assets/Bob.js(19,79): BCE0005: Unknown identifier: 'deltaTime'." What should I do? I am using Windows Vista. Is it different from Mac?
lommo13 1 year ago
thanks this has helped me learn unity alot easier im checking out the rest of your videos without your help I would have been so done for =)
grimdeath999 1 year ago
hey i was wondering what is a good book on how to script (java script) please reply :S
treevstree 1 year ago
Great videos, they're helping me so much for my video game design class!
Also, loving the tegan and sara in the back : )
nkrvr 1 year ago
im downloading Unity right now, watching your vid, and learning Java script all at the same time... EPIC
neogoo123 1 year ago
heyy can u pm me when u first started to design and script
northyboy88 1 year ago
When i hold W it walking forward and when i hold S it walking forward to. When i hold d it rotate Right when i hold A it rotate Right to. What have i did wrong?
n00btroop 1 year ago
@n00btroop Check that any values that should be negative are. It can be easy to miss in the video.
RoastElCheapo 1 year ago
Comment removed
n00btroop 1 year ago
You said "Zee" this time. What's up with that?
JDCAce 1 year ago
I cant move I added all of the codes.
admirnaruto 1 year ago
Just out of curiosity, how the heck did you learn to do this and where did you go?
EndymionMastM 1 year ago
This has been flagged as spam show
My name is Mike from LA Although there busizz4me.info
adeliciaaddisyn 1 year ago
How can you setup a yek, like i can't use W for some reason....
GreatAmericanWorld 1 year ago
im having trouble looking LEFT and RIGHT it just moves the camera, i used the link at your website for the movement script so i dont know whats wrong
Oniafuchi 1 year ago
If you mention geek think of this guy.
diggygoggy 1 year ago
@diggygoggy "geeks" like him make the games you play, program the websites and softwares you use, and made the computer you are sitting right know, have a little respect if it was an insult
santi97loco 1 year ago
Comment removed
lewisduncan93 1 year ago
Comment removed
lewisduncan93 1 year ago
you are awsome, great tutorial.
tweekxxx 1 year ago
This has been flagged as spam show
it keeps saying "Assets/movearound.js(13,59): BCE0005: Unknown identifier: 'speed'."
or
"Assets/movearound.js(17,60): BCE0005: Unknown identifier: 'speed'."
and I dunno why?
the code was; { /* if(Input.GetButtonDown("jump")) { transform.position.x += 0.25; } */ if(Input.GetButton("w")) { transform.position += transform.forward * speed; } if(Input.GetButton("s")) { transform.position += -transform.forward * speed; }
}
at first, right?
moanator 1 year ago
Thx for the tutorial. Youtube + guy like you making education system obsolete.
coortex1 1 year ago
15.000e
101joeri 1 year ago
dude i made a game were u navigate through a maze but i can just walk through the walls what can i do to stop this?
conger102 1 year ago
This has been flagged as spam show
@infiniteammoinc
var moveSpeed = 3.0;
var turnSpeed = 3.0;
function Update () {
if(Input.GetButton("forward"))
{ transform.position += transform.forward * moveSpeed * Time.deltaTime; } if(Input.GetButton("backward")) { transform.position += -transform.forward * moveSpeed * Time.deltaTime; } if(Input.GetButton("left")) { transform.eulerAngles.y += -turnspeed * time.deltaTime; } if(Input.GetButton("right")) { transform.eulerAngles.y += -turnspeed * time.deltaTime; }
}
conger102 1 year ago
This has been flagged as spam show
@infiniteammoinc dude i made this first person controller script by watching your vid but when i try it out it doesnt wor can you help me? ill post my script in the next comment and anybody is free to use it }
}
conger102 1 year ago
dude i made this first person controller script by watching your vid but when i try it out it doesnt wor can you help me? ill post my script in the next comment and anybody is free to use it }
}
conger102 1 year ago
THANK YOU!!!! I WAS LOOKING FOR HOW TO SCRIPT WITH ACTUAL BUTTONS!!
superknife24 1 year ago
It says "input button W is not a setup" help!
math110c 1 year ago
really useful, thanks.. there need sto be a free course in unityscript, explaining from beginning to end how to use it basically.. >.>
Obliviboy12 1 year ago
thanks for getting me started with unity :D its always this wall of starting to learn a new program that keeps me from actually learning it lol
OGMO11 1 year ago
Thank you so much
code has always been ruining my game creating opportunities
I feel a little safer now
TheAbridgedBros 1 year ago
hmm there comes a message, there standing i cant mofide a euler Angle :(
Cannot modify the return value of `UnityEngine.Transform.eulerAngles' because it is not a variable
RaverGames 1 year ago
can you set the script at 18 secound in the chatt :)?
Felixfors 1 year ago
Could u send me the entire script? i dont understand shit about scripts
Rockstartut 1 year ago
WHY CANT I FIGURE OUT SCRIPTS!!!!!!! >.<
aggressivegeek 1 year ago
@aggressivegeek SERIOUSLY SAME HERE!!!!!!!
superfartdog 1 year ago
@superfartdog Maybe you should try some basic scripting languages before jumping into JS. :P
AveryMaurice 1 year ago
@aggressivegeek pisses me off 2 D:
flamingmonkeygroup 1 year ago
Thanks Guy. Awesome tutorials. I found that 'transform.eulerAngles.y += x amount;' works just fine. Don't really get the point of turn speed even though it's cool I guess. But anyway, this tutorial helped me out heaps so thanks!
P.S. you look like Noel Fielding.
hearts2spooge 1 year ago
how did you change what keys do what
lolmanAza 1 year ago
cool tutorial. Only issues are that your webcam section blocks out the script at the end, and you kind of rushed through setting up the input tab.
patrickchedges 1 year ago
If you don't know what is a variable this video is totally useless man!!
Obviously this is a reference video for those who already know programing and unity also, but you then teach about the basic Ui commands in unity!
This tutorial is a mess, but useful for someone like me, i don't want to be rude, just i want to make a constructive criticism, you have to define the tutorial goal, the target audience and then restrict the topics to that target.
Btw thanks for the video!
agustinbs 1 year ago
my camera dont rotate it just goes left and right
sticksanity 1 year ago
@sticksanity Compare your code to that in the video, and see if you can notice any differences. With programming, if you can't tell what's wrong right away, it's probably something subtle. Then again, it's quite possible that it's really obvious and you're just not seeing it yet. :) (happens to everyone)
infiniteammoinc 1 year ago 2
@infiniteammoinc do u have a tutorial on textures? if u dont pls consider making one. pls reply.
emantharp5 1 year ago
@infiniteammoinc Your face is covering that part of the code.
donov25 8 months ago
@sticksanity you must have used transform.position for "A" and "D" which is wrong, because when you push A and D you want it to "turn"(change angles/rotate), so you should use transform.eulerAngles.blah blah blah...
keeperkai999 1 year ago
can you do a tutorial on how to change yahoo profile pic
poundsounds2009 1 year ago
@poundsounds2009 that is fucking hilarious at just how dumb you might be.
HumanLies 1 year ago
I'd like to see how to make the player walk up hills and have gravity etc.
Khyrid 1 year ago
I WANT TO MAKE FPS GAME!!!
MoskowFreak1111 1 year ago
Cool! I am looking into Unity, and it looks really cool. The scripts and UI remind me a bit of Maya, but better, WAY better. I would say the only problem with this tutorial is that your face gets in front of the code quite a lot.
meganite03 1 year ago
Yup. Was using GetButtonDown. Allowed it to seep in from code commented out in first part of the tut. Thank you very much for your reply! I think I'm starting to have fun learning to code :~).
Now, going to work on the jump so the character goes up and comes back down smoothly. Obviously, GetButtonDown won't do the trick. Have to learn about gravity, hehe. I do have code I can coopt and learn from in the Unity documentation. Going through the 3d platformer tut now. Thx again!!! :~)
Mrinfinitewave 1 year ago
Everything seems to be working correctly, except that in your vid it seems like you're getting continuous movement while holding a button, whereas I get one movement with each button press. Are you having to repeatedly press a button to get continued movement?
I attempted changing the "if" statements with "while" thinking it would work, but no luck so far. I'll keep working on it, but feedback appreciated ~ and thanks again for the tut :~)
Mrinfinitewave 1 year ago
You may be using GetButtonDown instead of GetButton? Get ButtonDown only returns true when the button goes down. After that it returns false. GetButton returns true if the button is down, false if it's not.
You don't need to use a while loop. (Update gets called every frame from the main loop)