• Unity3D - Discussion
    5,004 replies, posted
Speaking of multiplayer, who here is excited for UNET? :D
Anybody have any ideas about the problem I had above?
[QUOTE=Over-Run;44899080]Anybody have any ideas about the problem I had above?[/QUOTE] What's the destroying code? When is it called in relation to that coroutine?
[QUOTE=Pelf;44899116]What's the destroying code? When is it called in relation to that coroutine?[/QUOTE] I have this code which destroys it upon contact with the player [code] public AudioClip powerupSound; void OnTriggerEnter(Collider collider){ CharacterController cc = collider.gameObject.GetComponent<CharacterController>(); if(cc != null){ Destroy(this.gameObject); if(powerupSound) AudioSource.PlayClipAtPoint(powerupSound, transform.position); } }[/code] Its in the LightPowerup script
You're calling transform.position of the gameobject for the AudioSource, but you're destroying the GameObject itself before this is called.
[QUOTE=Over-Run;44898149]That didn't work it just froze my whole game[/QUOTE] It froze because Unity is retarded and when it can't find a component it has to freeze and search for like 20 seconds. You appearantly couldn't access the hit.collider.
[QUOTE=KillaMaaki;44898977]Speaking of multiplayer, who here is excited for UNET? :D[/QUOTE] I would be more excited if it came out 2 months ago :(
This is coming out in the next couple of days I think [url]http://boltengine.azurewebsites.net/[/url] Looks like it might even be better than UNET. Websites not finished, videos are temporary and I assume other stuff too.
What do you guys think of Photon networking?
Last time I looked at Photon it required you to write another program for the server, to bounce messages off? I feel like a lot of the networking solutions miss the mark in a few ways. One of the big ones is dedicated servers, a lot of the current solutions assume that you're going to be hosting listen servers all the time. That's one of the reasons I wrote our own library using LidGren for Rust.
Although this look like the Freespace from last page, it has has next to nothing in common with it code-wise. This is something completely different that I started from scratch yesterday morning and I've been working on almost non-stop since. I'm pretty proud of it, there's a lot of stuff going on in here that a legit game would do. Usually I just hack things together as fast as possible because I have a singular goal in mind, but this one is actually nice and modular and full of re-used code and components that are (mostly) agnostic of the implementation of each other. All they care about is the results and outputs. [vid]https://dl.dropboxusercontent.com/u/15133164/Freespace%20Simulator/Starfighter%202014-05-25%2005-55-02-97.webm[/vid]
[QUOTE=FalconKrunch;44898251][code]*code* [/code] It's not really all that interesting. I've read up about it, and it seems I need to do multiple passes, one for normal vertex lights such as directional lights(Which it is doing now), and another one for pixel lights. But when I try and add a pass, I get a syntax error when defining my own lighting pass. Can someone help me with this?[/QUOTE] If I remember correctly the _WorldSpaceLightPos0.w is always 0 for directional lights. So you'll need to calculate attenuation for cases where it's not since directional lights don't have any attenuation. Example: [code] if (_WorldSpaceLightPos0.w == 0.0){ //directionalLights atten = 1.0; lightDirection = normalize( _WorldSpaceLightPos0.xyz ); } else{ float3 fragmentToLightSource = _WorldSpaceLightPos0.xyz - i.posWorld.xyz; float distance = length(fragmentToLightSource); atten = 1/distance; lightDirection = normalize(fragmentToLightSource); } [/code]
[QUOTE=Huabear;44902458]You're calling transform.position of the gameobject for the AudioSource, but you're destroying the GameObject itself before this is called.[/QUOTE] When I get rid of the AudioPlaying it gets rid of a few instances of the error but it still happens. Any idea? EDIT Nevermind fixed it. I had to do a combination of what you guys said and add in an else break to the code works fine now :) What's the best way of handling Health in Unity? I have my health class I can add or subtract, and once I die, the screen goes black and white and I stop movement. From here what should I do? Simply make it so if you press a button it reloads the level? I was hoping to add in checkpoints at some stage but not sure how it all works.
[URL]https://googledrive.com/host/0B79XexGiVbTzUjZSeEF4SldJSmc/MadPlatformer.html[/URL] My first try ever. Used assests from Asset Store, some tutorials, added some of my code and it's here. Wow, I'm pretty impressed how fast it's done in unity. PS. Where should I put my game, so there would be already game instead of link to it?
[QUOTE=nVidia;44905390]If I remember correctly the _WorldSpaceLightPos0.w is always 0 for directional lights. So you'll need to calculate attenuation for cases where it's not since directional lights don't have any attenuation. Example: [code] *code* [/code][/QUOTE] Thanks, I'll try it out tomorrow.
[QUOTE=Krizzu;44906641][URL]https://googledrive.com/host/0B79XexGiVbTzUjZSeEF4SldJSmc/MadPlatformer.html[/URL] My first try ever. Used assests from Asset Store, some tutorials, added some of my code and it's here. Wow, I'm pretty impressed how fast it's done in unity. PS. Where should I put my game, so there would be already game instead of link to it?[/QUOTE] it's okay that i'm not able to double jump while i'm falling? but if i don't jump on a platform and fall i can jump?
[QUOTE=gonzalolog;44907284]it's okay that i'm not able to double jump while i'm falling? but if i don't jump on a platform and fall i can jump?[/QUOTE] As I said, i used some code from Asset Store, which was a bit of mess, for me, so go ahead and try everything. I'm going to rewrite all thing in next days, add some background, change character, etc. :d
I just want something easy, simple and free to use, builind own tools (Again) [IMG]http://i.imgur.com/RQT0hOX.jpg[/IMG] The difference between the old one that i did was that this only depends of 2 points, and accept cropping (Something like the old ones wouldn't accept) I like to build stuff from script, i hope make it serializable...
(The website is from 000webhost, in case some have trouble with it being called "Not trusted") [unity]http://sviska.comeze.com/Web.unity3d[/unity] I'm making a 2D RPG game as a personal learning thingie, as I'm very new to Unity. I just got my web/database integration, but fuck me, PHP is annoying. Next thing is to get the website to send the data (Level, EXP and Gold) and then to make the character. The art, cursor and music is not mine. :) Also, the register button and login system are used on my local IP, so don't bother trying to register/login.
[QUOTE=KillaMaaki;44895660]Finally got Lux to import without powering off my computer o.O Made my first barrel. Modeled in Blender, textured with Photoshop CC and free version of Quixel dDo. I'm normally a programmer, so this is a bit out of my comfort zone. There's also a lot wrong with the barrel... like for instance crappy normal map. Next time I'll bake a high poly version instead of trying to half-ass it. Shots are rendered from Unity. [/QUOTE] Did you use the unity's shader or did you wrote a new shader? Also can you show the normal map? Chances are, the unity shader doesn't have the normal perturbed.
[QUOTE=Skibur;44909268]Did you use the unity's shader or did you wrote a new shader? Also can you show the normal map? Chances are, the unity shader doesn't have the normal perturbed.[/QUOTE] I'm using Lux There's no doubt the normal map is working, it's just that it's not a good normal map.
Do you ever feel lonely? Do you ever feel betrayed by the fact that no matter what game you play, that game will never love you back? Have you always wanted to give a hug to your favorite character or even dry hump them? No matter what you're seeking, I have the perfect solution for you and all your lonely problems. [B]PREPARE TO FEEL THE LOVE[/B] [unity]https://dl.dropboxusercontent.com/u/3591152/wiseau.unity3d[/unity] [IMG]http://nutgraphweekly.files.wordpress.com/2014/03/tommy-wiseau.jpg[/IMG] Ha ha , this is the future of love.
why i'm running with z
Because I live in a world of ZQSD, you can now experience firsthand the feeling most europeans get when games don't allow you to map WASD keys to something that actually makes sense on their poor little azerty keyboards. Also, because I'm lazy.
[QUOTE=Xerios3;44909879]Do you ever feel lonely? Do you ever feel betrayed by the fact that no matter what game you play, that game will never love you back? Have you always wanted to give a hug to your favorite character or even dry hump them? No matter what you're seeking, I have the perfect solution for you and all your lonely problems. [B]PREPARE TO FEEL THE LOVE[/B] Ha ha , this is the future of love.[/QUOTE] why does win8 do this to me [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-05/2014-05-26_08-47-45.png[/t]
[QUOTE=Pelf;44913032]why does win8 do this to me [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-05/2014-05-26_08-47-45.png[/t][/QUOTE] That's odd, I always imagined Unity as a fail-proof solution. I'm also running win8. Perhaps it has something to do with me setting graphics to max as default setting? Try this low graphics version. [unity]https://dl.dropboxusercontent.com/u/3591152/greatest.unity3d[/unity] (Unfortunately, it does not offer love in wiseau-way, but it does give compliments)
[QUOTE=Xerios3;44914060]That's odd, I always imagined Unity as a fail-proof solution. I'm also running win8. Perhaps it has something to do with me setting graphics to max as default setting? Try this low graphics version. - (Unfortunately, it does not offer love in wiseau-way, but it does give compliments)[/QUOTE] haha that's awesome. What's the quality settings of that build? I've been the same problem with my game: [url]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-05/2014-05-19_11-24-29.png[/url]
The unity's default "Fastest" setting.
[QUOTE=Xerios3;44914262]The unity's default "Fastest" setting.[/QUOTE] [del]It seems blend weights >1 is what's causing my problems[/del] [editline]edit[/editline] If I disable shadows in the quality settings it works.
[B]Unity 4.5 is out![/B] [url]http://unity3d.com/unity/whats-new/unity-4.5[/url] Hohoho, them bug fixes. Looks good!
Sorry, you need to Log In to post a reply to this thread.