I tried that but my png data is RGB24, for whatever reason it keeps changing it to ARGB32.
Seems to work if I set the texture to RGB24 first but I run out of memory loading large lightmaps, fuck knows what unity is doing.
Oops! I'm an idiot, I was loading the lightmap texture for every material (about 100 of them) Not good. Works great now though.
[img]https://dl.dropboxusercontent.com/u/99765/7823784f.png[/img]
How can I easily rotate and object to face another but only rotate it around one axis?
[QUOTE=Pelf;43922893]How can I easily rotate and object to face another but only rotate it around one axis?[/QUOTE]
Welcome to hell.
[QUOTE=Pelf;43922893]How can I easily rotate and object to face another but only rotate it around one axis?[/QUOTE]
I think you can do it :)
Save objects rotation. (var tempRotation)
Rotate the object to face another object. (var currRotation)
Then do this -> tempRotation.y = currRotation.y
and set tempRotation back to the object you wanted to rotate in Y axis.
Those are Euler angles I think.
[QUOTE=Pelf;43922893]How can I easily rotate and object to face another but only rotate it around one axis?[/QUOTE]
(The answer is always quaternions...)
Rotate the whole system so that your axis is upright, then it becomes trivial to extract the one-dimensional rotation necessary to face the object (ignore one coordinate and use atan2 on the other two offsets).
After that, you apply it to your first object and then rotate it back into the usual world space.
[editline]edit[/editline]
Actually, this might be one of the exceedingly few problems that might actually work decently with "Euler" angles, but you can't really use standard math functions if you try that.
It would work by describing the axis with the first two angles, applying the inverse to the target and then getting the third angle from the resulting direction vector.
Then you can apply the three angles as "normal" to your first object.
Double quotes because this isn't entirely standard afaik. (Also, no idea how to invert Euler angles properly.)
You should probably only try this if you have a solid enough grasp on trig that you can debug mistakes with no error messages whatsoever.
Is it possible to use unity to animate 2d stuff? As in create a bone structure and what not?
[QUOTE=Richy19;43943931]Is it possible to use unity to animate 2d stuff? As in create a bone structure and what not?[/QUOTE]
Yep, it's shown in the 2d walkthrough video.
[media]http://www.youtube.com/watch?v=4qE8cuHI93c[/media]
Why most Unity tutorial uses Java, I've been trying to find some good tutorials but they are all coded using Java. I can't really find anything useful related to C#
[QUOTE=BoowmanTech;43949090]Why most Unity tutorial uses Java, I've been trying to find some good tutorials but they are all coded using Java. I can't really find anything useful related to C#[/QUOTE]
In all honesty it really doesnt matter, there pretty similar as long as you know the basics of the language
I started with C# since that's what I am learning at school but if I go with JavaScript.
What are the main disadvantages of using JavaScript and not C# and can you combine them ?
Like have some JavaScript files and some C# files.
[editline]17th February 2014[/editline]
What programming language is "Rust" using ? Since it's in Unity it can be C# or JavaScript
[QUOTE=BoowmanTech;43949460]I started with C# since that's what I am learning at school but if I go with Java.
What are the main disadvantages of using Java and not C# and can you combine them ?
Like have some Java files and some C# files.
[editline]17th February 2014[/editline]
What programming language is "Rust" using ? Since it's in Unity it can be C# or Java[/QUOTE]
Unity doesnt use java, it uses javascript. I imagine rust uses C# but I dont think it makes any difference under the hood
Sorry I meant to say JavaScript
[QUOTE=BoowmanTech;43949995]Sorry I meant to say JavaScript[/QUOTE]
I think you can have some C# and some Javascript files, but I havent really had much experience with unity and all that I have has been exclusivelly with C# so maybe someone else has more information about this.
I think it all comes down to what you are most comfortable with, all the Unity API is exposed in both languages. But if you feel more comfortable using C# then do so and just follow the js tutorials
Honestly I am not comfortable with neither one of them since I don't really know the languages.
I could say I know C#,LUA,PHP but only basics nothing special(beginner tutorials)
Yes, you can mix all languages Unity supports.
Can someone tell me some major limitation between C# and JavaScript.
[QUOTE=BoowmanTech;43951649]Can someone tell me some major limitation between C# and JavaScript.[/QUOTE]
In Unity there isnt really any
[QUOTE=BoowmanTech;43951649]Can someone tell me some major limitation between C# and JavaScript.[/QUOTE]
The amount of tutorials, examples and addons. I think there's more in C# but I'm not entirely sure.
Not only unity, mostly in general(regardless creating games).
I might be wrong but in my opinion JavaScript is used for websites nor for games.
Maybe a few years ago if you wanted to show me a game made using JavaScript I would have think to a game with crappy graphics and controls, and laggy.
Anyway would it be possible to make a game like CS:GO using JavaScript ? (only coding, let's say I already have the models,textures,animations...)
[QUOTE=BoowmanTech;43951806]Not only unity, mostly in general(regardless creating games).
I might be wrong but in my opinion JavaScript is used for websites nor for games.
Maybe a few years ago if you wanted to show me a game made using JavaScript I would have think to a game with crappy graphics and controls, and laggy.
Anyway would it be possible to make a game like CS:GO using JavaScript ? (only coding, let's say I already have the models,textures,animations...)[/QUOTE]
Don't mix unity's scripting languages and things like web javascript, they're not the same. The syntax is similar and its pretty much a scripting language interpreted by Unity afterwards.
After some research though, performance should be the same when using UnityScript (JavaScript) or C#. Although some functionalities of UnityScript are handled by Unity behind your back which could potentially cost a bit of performance (check source for more information).
Sources:
[URL]http://forum.unity3d.com/threads/18507-Boo-C-and-JavaScript-in-Unity-Experiences-and-Opinions[/URL]
[URL]http://answers.unity3d.com/questions/7528/how-should-i-decide-if-i-should-use-c-javascript-u.html[/URL]
I also added a poll for people wondering usage stats.
Poll: [URL]http://forum.unity3d.com/threads/18507-Boo-C-and-JavaScript-in-Unity-Experiences-and-Opinions[/URL]
[thumb]http://files.1337upload.net/progress_3.png[/thumb]
Writing a VMF importer for Unity.
Hey, quick question. I want to check all children of a GameObject if they have a certain script attached and call a function in it if they have. But it tells me that <Modularbehavior> could not be found. I've searched the internet, but found no solution. :/ Any ideas?
[code] foreach (Transform child in transform)
{
// Test if child is leaf node
if (child.gameObject.GetComponent<Modularbehavior>())
{
child.gameObject.GetComponent<Modularbehavior>().SetEnabled(seed);
}
}[/code]
Here's the error:
Assets/DEV/Modular behavior/Scripts/Modularbehavior.cs(51,47): error CS0246: The type or namespace name `Modularbehavior' could not be found. Are you missing a using directive or an assembly reference?
...I hope this is the right place for this question ;)
I made a vbsp loader in 2 days. I did want to texture it before showing it but I needed to write VPK & VTF loaders which would have took a while. Lightmaps and displacements work, I still need to do bump mapped lightmaps and self-shadowed bump maps. I need to write custom shaders for them.
[img]https://dl.dropboxusercontent.com/u/99765/uvbsp321901.png[/img]
[img]https://dl.dropboxusercontent.com/u/99765/uvbsp320931.png[/img]
[img]https://dl.dropboxusercontent.com/u/99765/654523.png[/img]
I'm so much more productive with unity because I can write what I need to write without getting side tracked with engine code. I also code much faster because I'm not as much of a perfectionist when working in unity, I just get shit done.
That's fucking awesome Layla, may I ask if you're ever gonna release that?
Also, what language are you using on Unity?
I don't think it's that useful for anyone, I'm just doing it for fun. It would only be useful if I actually make use of the bsp tree for visibility and collision but I don't think Valve is going to let you ship any games using it. If I was to release anything like this I'd just make one for Q3 bsp because you can ship games using that and there's very little difference. I'm using C#
Does anyone have tips on making shadows look half decent in unity
[QUOTE=Johnny Guitar;43969430]Does anyone have tips on making shadows look half decent in unity[/QUOTE]
Do you have Unity Free or Pro?
Finally resubmitted my starter kit to the unity asset store. I'll post more info if it gets accepted this time.
[QUOTE=Asgard;43969677]Do you have Unity Free or Pro?[/QUOTE]
unity pro yo
[QUOTE=Johnny Guitar;43970652]unity pro yo[/QUOTE]
It definitely helps to use soft shadows, and not make the shadows pure black. Give them some opacity and colour them to the environment. Things like Fog, DoF, coloured environmental lights, etc. help too. Also the anti aliasing script in the pro standard image effects makes everything 10x better.
Sorry, you need to Log In to post a reply to this thread.