• Unity3D - Discussion
    5,004 replies, posted
[QUOTE=Pelf;44279077]Made an editor tool to ease workflow: getting initial velocity visually. You move around the little node thing and it will calculate the initial velocity of the specified object by the distance and direction of the node from the object. Then it shows the trajectory of the object using that initial velocity. [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-18_14-49-39.gif[/IMG] Also supports different gravity modes (above is single body, below is n-body) [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-18_15-10-40.gif[/IMG][/QUOTE] Interesting, how do you integrate those values?
[QUOTE=HeatPipe;44308289]Interesting, how do you integrate those values?[/QUOTE] First I put a prefab in my scene with an EditorGetVelocity gizmo script. Then I define the gameobject that I want it to get/preview the initial velocity for. [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-21_09-49-12.png[/t] In the script, in OnDrawGizmosSelected(), it gets the Gravity and InitialVelocity components of the target object. [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-21_09-52-06.png[/t] The gravity mode defined in the targets Gravity component will determine how it previews the orbit. The initial velocity is simply calculated by the difference between the positions. The initial velocity value on the targets InitialVelocity component is then set to the calculated velocity and then the script is set to be dirty. Setting it to be dirty is what makes it appear bold. If it isn't set to be dirty then the new value isn't saved when you press play. [code]calculatedInitialVelocity = ( currPosition - targetPosition ); targetInitialVelocityScript.initialVelocity = calculatedInitialVelocity; EditorUtility.SetDirty( targetInitialVelocityScript );[/code]
[QUOTE=Pelf;44309123]First I put a prefab in my scene with an EditorGetVelocity gizmo script. Then I define the gameobject that I want it to get/preview the initial velocity for. [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-21_09-49-12.png[/t] In the script, in OnDrawGizmosSelected(), it gets the Gravity and InitialVelocity components of the target object. [t]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-03/2014-03-21_09-52-06.png[/t] The gravity mode defined in the targets Gravity component will determine how it previews the orbit. The initial velocity is simply calculated by the difference between the positions. The initial velocity value on the targets InitialVelocity component is then set to the calculated velocity and then the script is set to be dirty. Setting it to be dirty is what makes it appear bold. If it isn't set to be dirty then the new value isn't saved when you press play. [code]calculatedInitialVelocity = ( currPosition - targetPosition ); targetInitialVelocityScript.initialVelocity = calculatedInitialVelocity; EditorUtility.SetDirty( targetInitialVelocityScript );[/code][/QUOTE] Looked at those pictures and then again at the GIF and now everything is quite clear! Thanks! Looks simple enough hehe :D
[QUOTE=gonzalolog;44305419]Maybe you could start from here [URL]https://www.assetstore.unity3d.com/#/content/7953[/URL] [editline]21st March 2014[/editline] hum...Sorry, but when will be their Spring (I don't want to wait 6 months more)[/QUOTE] Already have the hydras working, I'm looking for information on how to make nice particle systems and effects
I started working on a small android game yesterday and ran into a bit of a snag. [t]https://dl.dropboxusercontent.com/u/48795891/dontknowtofix.jpg[/t] Is it possible to keep the Line Renderer from squashing the line at the reflection points like that?
[QUOTE=Jacen;44321765]I started working on a small android game yesterday and ran into a bit of a snag. [t]https://dl.dropboxusercontent.com/u/48795891/dontknowtofix.jpg[/t] Is it possible to keep the Line Renderer from squashing the line at the reflection points like that?[/QUOTE] It looks like your lines are just twisting around at each intersection. The line renderer just generates a series of continuous quads from each point you provide so you might be able to get away with dropping an extra point at each corner. If that doesn't work then you can use a line renderer for each segment.
Yeah, that's what I thought was happening. Didn't think about the extra point though, I'll try that, thanks. Edit: I managed to get it to work by adding in the extra points, as suggested, and offset them just a tiny amount in the direction the line was going before the reflection. Now to design some real art assets and I'll be in business.
Does anyone have tips on syncing physics objects to other clients, without it lagging to hell and back? I'm basically working on a multiplayer project, and since it uses physics, this kinda stopped development atm, until I fix it.
[QUOTE=sarge997;44322344]Does anyone have tips on syncing physics objects to other clients, without it lagging to hell and back? I'm basically working on a multiplayer project, and since it uses physics, this kinda stopped development atm, until I fix it.[/QUOTE] You need to create artificial lag, around 100ms is fine. If you create this artificial lag, you have time between to sync stuff before it is displayed.
Does anyone else here have problems with MonoDevelop randomly freezing for a second or two when typing out your code?
[QUOTE=Jacen;44332338]Does anyone else here have problems with MonoDevelop randomly freezing for a second or two when typing out your code?[/QUOTE] Yes. You can use Visual studio express for C# needs. (you include Unity dlls and intelliSense will work!)
[QUOTE=HeatPipe;44332462]Yes. You can use Visual studio express for C# needs. (you include Unity dlls and intelliSense will work!)[/QUOTE] Oh wow, that's awesome.
[QUOTE=Jacen;44332545]Oh wow, that's awesome.[/QUOTE] I know. As much as microsoft suck, theirs tools rock
I've seen really high quality gif images of Unity games, was wondering what people use to make them? I want to put some gifs on my blog of my project
Just started playing around with Unity. I really like it so far, really simple and easy to use. I literally just imported random models I had created from Blender by clicking and dragging. [thumb]http://i60.tinypic.com/fon6dj.jpg[/thumb]
[QUOTE=Rayboy1995;44342398]Just started playing around with Unity. I really like it so far, really simple and easy to use. I literally just imported random models I had created from Blender by clicking and dragging. [thumb]http://i60.tinypic.com/fon6dj.jpg[/thumb][/QUOTE] Well, we are in 2014, 'bout time we start seeing simplicity like this
[QUOTE=Over-Run;44339054]I've seen really high quality gif images of Unity games, was wondering what people use to make them? I want to put some gifs on my blog of my project[/QUOTE] [url=http://blog.bahraniapps.com/?page_id=21]Gifcam[/url] Or I just take some screenshots, layer them in gimp, and save it as a gif
If you want to make a multiplayer game, is "Unity Master Server" good or I should use something else. I mean if it's secure and good for more serious games. If someone could give me some advantages and disadvantages.
What do you guys think about uLink, and do you know if you need a license to publish free games? [QUOTE=BoowmanTech;44352098]If you want to make a multiplayer game, is "Unity Master Server" good or I should use something else. I mean if it's secure and good for more serious games. If someone could give me some advantages and disadvantages.[/QUOTE] I think it really deppends what game you're creating, but if you're looking for many players in a action-oriented game it's probably not Unity Networking you're looking for.
[QUOTE=BoowmanTech;44352098]If you want to make a multiplayer game, is "Unity Master Server" good or I should use something else. I mean if it's secure and good for more serious games. If someone could give me some advantages and disadvantages.[/QUOTE] A very successful Android/iPhone game I worked on (not sure if I can give names or not but its in the millions of users) just used a php backend. Then again this wasnt so much multiplayer as it was high scores and such
If it is not realtime multi-player (aka turn-based or something slow), then it is not problem as much as real-time, where every split second counts and is pain in the ass to get it right
Basically it's racing multiplayer.
[QUOTE=BoowmanTech;44352861]Basically it's racing multiplayer.[/QUOTE] Welcome to hell.
Can anyone elaborate on the Unity multiplayer being bad for real time games? I've been looking at the docs (haven't played around with it yet), and it looks pretty solid from there. State synchronization with delta compression, etc. I should note though that I am looking at making a coop game vs AI controlled enemies, so I don't have many concerns in terms of cheating / authoritative clients
[QUOTE=sarge997;44352922]Welcome to hell.[/QUOTE] Actually no, hell is warm and cozy. This is just cold and suffering in unsynchronized pain, all in silence.
-snip- found it.
I was wondering if I could get some help with weapon selection and how it should be done. I have a spell for each button on the Hydra (4 total). Right now I have a hand object tied to the hydra so it moves, and I attached a cylinder to the hand to act as a magic wand. So when I press the buttons on the controller right now I have them changing colour to match the spell selected. But how should I go about spell selection? Right now I have a Light Spell & a Physics spell scripts attached to the wand. I have a light attached to the wand that holds a ChangeSpell script which changes the light colour depending on the button pressed, and it has a method to return the selected button. I use this button to perform checks in the Light & Physics spell scripts to toggle which one is activated and I'm having some trouble with it at the moment. Generally what is the nicest approach to this?
[t]https://dl.dropboxusercontent.com/u/10242817/test1.gif[/t][t]http://i.imgur.com/khA66e5.jpg[/t] [t]http://i.imgur.com/YkmeniC.jpg[/t] Here's something we've been working on for the past two and half months. We're in the beta phase, so anything could happen.
Why wouldn't you use Unity Master Server for more complex games that needs more synchronization? For example a game like GTA but at a much smaller scale.
Anyone knows how to get the depth of a mesh/collider along a vector? I mean something like this: [img]http://puu.sh/7Ko8p/b9f99ed894.png[/img] What I want is the green line's length. Otherwise the horizontal thickness of the mesh/collider would do fine too (then I'll get the green one with some trig and the angle).
Sorry, you need to Log In to post a reply to this thread.