kessler
|
|
« Reply #100 on: July 26, 2010, 10:59:40 PM » |
|
oh mamma. I have been been following along for the movement tut and I believe that my scripts are not compiling. I read that its an error on the windows platform. Do you guys know a way around this? The first part of that tutorial worked just fine and compiled. The space bar to move camera forward. Thanks chaps.
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #101 on: July 26, 2010, 11:03:27 PM » |
|
Do you see any error messages?
EDIT: There's an error console line visible at the bottom of the Unity window. You can double click it to see the console, alternatively you can go to Window -> Console.
That'll show you any errors that may have happened during compilation.
|
|
« Last Edit: July 26, 2010, 11:33:14 PM by Alec »
|
Logged
|
|
|
|
kessler
|
|
« Reply #102 on: July 27, 2010, 12:32:34 AM » |
|
Hey Alec, I think something is terribly wrong. In my first test map I can no longer drag my script on to the camera. So I poo poo that test game. I started a new one and it seems that things have compiled and I got the W and S keys working but had to comment out the turns because of this error: "Cannot be used with left hand side of 'float' and right hand side of type 'UnityEngine.Vector3'"When I change the vars the values do not change on its corresponding drop down in the inspector. I am sure sure the Makers Mark Bourbon Whiskey isn't helping matters so I am just attack this again tomorrow after work and watch the magic unfold. YEAH!!!
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #103 on: July 27, 2010, 12:43:47 AM » |
|
I started a new one and it seems that things have compiled and I got the W and S keys working but had to comment out the turns because of this error: "Cannot be used with left hand side of 'float' and right hand side of type 'UnityEngine.Vector3'" Would help if you'd post the script, or segment of the script that's causing you those problems. When I change the vars the values do not change on its corresponding drop down in the inspector. You mean if you change the default values in the script they don't propagate to the component inserted in something? Try right-clicking on the component panel and clicking 'reset values'. Defaults don't automatically propagate.
|
|
|
Logged
|
|
|
|
brian
|
|
« Reply #104 on: July 27, 2010, 02:58:32 AM » |
|
Oddly enough, I've never run into a case where I've wanted a debugger for Unity. I guess I'm lucky. It's pretty rare but there's definitely points, especially when doing stuff that requires alot of backend (like RPG databases and games with lots of stored information) where you end up writing the same sort of code you would for a C++ style game and debugging bugs in them just revolves around debug logging constantly at every point to find out where the issue is. With Unity constantly providing the ability to look at variables' values it's never going to be as important is it is in C++/VisStudio but it's a handy tool in unavoidably bloaty projects.
|
|
|
Logged
|
|
|
|
Iamthejuggler
Level 6
|
|
« Reply #105 on: July 27, 2010, 08:02:36 AM » |
|
Do any of you know if there's a way to reset scale/tranform/rotate values so that it remains in it's current position/scale/rotation, but views that as it's new origin. i.e. if you then at a later date set it's position to 0,0,0 it's scale to 1,1,1 and it's rotation to 0,0,0 it would be in this new position?
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #106 on: July 27, 2010, 10:33:01 AM » |
|
Do any of you know if there's a way to reset scale/tranform/rotate values so that it remains in it's current position/scale/rotation, but views that as it's new origin. i.e. if you then at a later date set it's position to 0,0,0 it's scale to 1,1,1 and it's rotation to 0,0,0 it would be in this new position?
The only way this sort of makes sense is if you were talking about parenting. (if I'm understanding what you want...) i.e. you could parent object A to object B. (so that object A is a child of object B) (to do that you can set transform.parent or drag an object onto another one in the hierarchy view) That was, object A (the child) would be able to have a local position/rotation of (0,0,0) / Quaternion.identity, and you could rotate/move object B (the parent) to establish a new orientation. Keep in mind their are separate variables for accessing local transform stuff... i.e. transform.localPosition, transform.localRotation, transform.localScale. In this case an object would have a localPosition of (0,0,0) but a world position of... wherever the parent happens to be at.
|
|
|
Logged
|
|
|
|
Iamthejuggler
Level 6
|
|
« Reply #107 on: July 28, 2010, 05:44:29 AM » |
|
I guess that's sort of what i was asking, but really wanted to not have to parent it. It's possible in most 3d apps, maybe it's called freezing position/scale/rotation.
The only reason i wanted it was i placed a model from maya into unity, but it was totally the wrong scale, so had to scale it down to something totally unmemorable, like 0.137... and then in my script i was manipulating the scale based on where the character was. It was just a pain to have to use 0.137 rather than freezing it so that what had been 0.137 was now 1, making eveything much less confusing.
I guess i didn't explain it at all well! Cheers Alec.
|
|
|
Logged
|
|
|
|
brian
|
|
« Reply #108 on: July 28, 2010, 07:54:47 AM » |
|
Yeah the lack of being able to move pivots or freeze transformations is a bit of an annoying one, it's really worth getting the whole thing set up correctly in Maya first, including checking any FBX export options so it uses the same world units as Unity. There's also the import settings of each model where you can set the Scale Factor to import the model in, you can access this by just clicking on any of the imported models' prefab thing in the hierachy.
|
|
|
Logged
|
|
|
|
|
Alec
|
|
« Reply #110 on: July 28, 2010, 12:38:16 PM » |
|
I guess that's sort of what i was asking, but really wanted to not have to parent it. It's possible in most 3d apps, maybe it's called freezing position/scale/rotation.
Oops, did not know that!
|
|
|
Logged
|
|
|
|
kessler
|
|
« Reply #111 on: August 04, 2010, 10:00:29 AM » |
|
Alec I compared my code to yours and mine had quite a few errors and thus did not work. HA HA. thanks for taking the time to make these tuts man! they are great. I am really liking this engine and scripting in it.
|
|
|
Logged
|
|
|
|
Iamthejuggler
Level 6
|
|
« Reply #112 on: August 06, 2010, 04:16:38 AM » |
|
Just thought I'd mention this UnityScript Editor (javascript) over on the unity forums: http://forum.unity3d.com/viewtopic.php?t=51129windows only, I'm afraid. I think it's a better solution than the flashdevelop hack if you're using javascript in unity. I've been playing with this editor and whilst it's got potential it's currently far more frustrating to use than it is useful. It keeps re-indenting my code in ridiculous ways that make everything really hard to read, and often when you use the code completion it won't actually capitalise things that need to be capitalised. Shame, because i like the code completion better than having to remember everything.
|
|
|
Logged
|
|
|
|
|
|
kessler
|
|
« Reply #115 on: August 07, 2010, 05:32:15 PM » |
|
I just downloaded the notepad++. Its pretty jazzy. I like the color syntax better than the native unity one. Now all I have to do is learn to script. uhhhggg its so very hard for me. But I am going to do it.
|
|
|
Logged
|
|
|
|
Iamthejuggler
Level 6
|
|
« Reply #116 on: August 09, 2010, 03:49:33 AM » |
|
I couldn't get notepad++ set up properly to work with unity. All the files mentioned in that tutorial just don't exist anywhere on my system, so not sure whats up with that.
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #117 on: August 09, 2010, 04:24:59 AM » |
|
I couldn't get notepad++ set up properly to work with unity. All the files mentioned in that tutorial just don't exist anywhere on my system, so not sure whats up with that.
Hmm, well the tutorial is for Windows only. What version of Windows are you using? Windows Vista/7 have two different Program Files folders.
|
|
|
Logged
|
|
|
|
Iamthejuggler
Level 6
|
|
« Reply #118 on: August 09, 2010, 04:33:39 AM » |
|
Windows xp. I did a search on the whole hard drive for the file "unitykeywords.properties" just in case it was somewhere else, and no luck.
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #119 on: August 09, 2010, 04:37:43 AM » |
|
Do you know where your Unity folder in Program Files is?
|
|
|
Logged
|
|
|
|
|