• Unity3D - Discussion
    5,004 replies, posted
[QUOTE=ezraza;43818814]Here is our latest build. [/QUOTE] Feels like playing Serious sam :d
[QUOTE=sarge997;43821895]Nice mouse smoothing, is it custom?[/QUOTE] For the time being, we've been using the look script from the Sample Assets package that is provided by Unity. It's technically in beta, but they've released it on the [URL="https://www.assetstore.unity3d.com/#/content/14474"]asset store[/URL] in hopes of [URL="http://forum.unity3d.com/threads/223158-New-Standard-Assets-a-k-a-Sample-Assets-Beta-Release"]getting feedback on the forums[/URL] before they include it with Unity.
[QUOTE=ezraza;43818814]Here is our latest build. [/QUOTE] Neato. Reminds me of the Discs of Tron arcade game.
[vid]https://dl.dropboxusercontent.com/u/10242817/Guardhead%20Better.mp4[/vid] Got something interesting. Gotta love Zbrush and ShaderForge!
Making an n-body trajectory visualizer for an ingame level editor I want to add in soon: [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-02/2014-02-08_17-51-06.png[/IMG] At the moment it just calculates 1000 fixed updates into the future, setting positions of a line renderer every time. It also only calculates for one body right now but it's really easy to add in multi-body support. also, it's precomputed and not updated during play but that may change if I can reduce the overhead. [editline]edit[/editline] Having some trouble with prediction accuracy but it now supports any number of bodies and overhead should be a bit less than before. Still needs some poerformance improvement. And it doesn't detect collisions with anything. [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-02/2014-02-08_20-04-50.jpg[/IMG] [editline]edit[/editline] And a video. There's a bit of prediction error, not sure why. I also made it realtime and stop if it collides with something. [vid]https://dl.dropboxusercontent.com/u/13781308/Videos/Prediction.mp4[/vid]
[QUOTE=Pelf;43839945]-nice stuff-[/QUOTE] Are you taking velocity change into account when calculating for a certain time in the future?
Well, if he wouldn't his line wouldn't have the shapes you can see in the pictures, most likely.
Fixed it. I wasn't extrapolating positions properly. [vid]https://dl.dropboxusercontent.com/u/13781308/Videos/Accurate Prediction.mp4[/vid] Any ideas how I could optimize the code for this? [code] void Update() { PathPrediction(); } void PathPrediction() { lineRenderer.SetVertexCount( iterations / 10 ); currentIteration = 0; simulatedPosition = transform.position; velocity = rigidbody.velocity; gravityVelocity = Vector3.zero; while ( currentIteration < iterations ) { float iterationTenth = currentIteration / 10; // Set the position of the line renderer vertex once every ten iterations if ( iterationTenth == Mathf.RoundToInt( iterationTenth ) ) lineRenderer.SetPosition( Mathf.RoundToInt( iterationTenth ), simulatedPosition ); // Calculate movement due to gravity gravityVelocity = CalculateGravity() * Time.fixedDeltaTime; velocity += gravityVelocity; // Update the position of the current iteration simulatedPosition += velocity * Time.fixedDeltaTime; // Spherecast to see if anything is struck ray.origin = simulatedPosition; ray.direction = velocity; if ( Physics.SphereCast( ray, 0.1f, 0.5f, trajectoryCheckMask ) ) { // Set the vertex count of the line renderer to be the current iteration - prevents pointy end lineRenderer.SetVertexCount( Mathf.RoundToInt( iterationTenth ) ); // Break out of loop if something is struck break; } // Update iteration count currentIteration += 1; } } Vector3 CalculateGravity() { gravity = Vector3.zero; foreach ( CelestialObject spaceObj in SpaceObjects ) { if ( spaceObj.mass > 0 ) { // Calculate the direction of gravity gravityVector = simulatedPosition - spaceObj.transform.position; // Calculate distance to planet's center of gravity distance = gravityVector.magnitude; // Normalize the gravity vector gravityVector = gravityVector / distance; // Calculate gravitational force gravityForce = ( -0.02f * rigidbody.mass * spaceObj.mass ) / ( distance * distance ); // Calculate modifier for gravity gravityModifier = Mathf.Clamp( ( velocity.magnitude - 2f ) * 0.2f, 0, 2 ); gravityForce *= 1 + gravityModifier; // Add to gravitational force gravity += ( gravityVector * gravityForce ); } } return gravity; }[/code]
[QUOTE=Pelf;43846970] ~snip~ [/QUOTE] gravityVelocity = CalculateGravity() * Time.fixedDeltaTime; you are using Update, not FixedUpdate. Either change the Update to FixedUpdate, or change Time.fixedDeltaTime to Time.deltaTime instead. Honestly, it's best to go with FixedUpdate, since you are calculating physics in your game. This is essential to ensure your physics is updated correctly.
[QUOTE=Skibur;43847244]gravityVelocity = CalculateGravity() * Time.fixedDeltaTime; you are using Update, not FixedUpdate. Either change the Update to FixedUpdate, or change Time.fixedDeltaTime to Time.deltaTime instead. Honestly, it's best to go with FixedUpdate, since you are calculating physics in your game. This is essential to ensure your physics is updated correctly.[/QUOTE] no because every Update() I call the PathPrediction() method. PathPrediction() calculates where the lander will be after one fixed update, sets the line renderer vertex to that position, and repeats for the next iteration, for a total of (in this case) 2000 iterations.
[unity]https://dl.dropboxusercontent.com/u/10242817/CoolHead/CoolHead.unity3d[/unity] Workin on Transluency shader for 3 hours now.
I were working on a rolling ball for more than 3 months, i got this thing [IMG]http://fc09.deviantart.net/fs71/f/2013/336/f/1/preview_by_gonzalolog-d6wk4xs.jpg[/IMG] After all, i forgot to not go too deep inside learning proyects because the final product will be ugly and slow So i decide to rebuild everything again (I don't know if i'll use again the same models) and well, i got this in 3/4 hours [IMG]http://puu.sh/6QipT.png[/IMG]
Alright, I bought Daikon Forge. Now I only need to make a game.
[QUOTE=LuaChobo;43856776]Anyone know the best way to handle in-game adsense?[/QUOTE] [url]https://www.assetstore.unity3d.com/#/category/134[/url]
[QUOTE=jmazouri;43854166]Alright, I bought Daikon Forge. Now I only need to make a game.[/QUOTE] i were REALLY close to buy it No wait...I bought it D:
Anyone got the UFPS controller and Daikon Forge working together? My GUI just doesn't want to show at all. Normal camera's work fine.
[QUOTE=Arxae;43860964]Anyone got the UFPS controller and Daikon Forge working together? My GUI just doesn't want to show at all. Normal camera's work fine.[/QUOTE] I have, what did you import first?
UFPS. I tried adding NGUI first, but that wouldn't work either. It looks like a layer problem. The only result google gave was something to do with a unity crash So i switched to daikon, but that's a no go either.
sounds odd, are you sure you read all the readmes correctly because I imported UFPS Daikon Forge and it worked pretty much flawlessly
I'll try to reimport it again. EDIT: still a no go. Did you just import the packages entirely? Or did you change settings? Did you change anything about the camera? Or a certain layer?
Good luck, if you still need help I'll go redownload unity and try and help you out :smile:
[QUOTE=Johnny Guitar;43861288]Good luck, if you still need help I'll go redownload unity and try and help you out :smile:[/QUOTE] That is mighty appreciated :D
Unity is crashing on me every time I select an object in a scene. Has anyone else ever had this problem?
I did. It was because of Win8.1 bug though. Fixed it by launching with -force -d3d11.
[QUOTE=secundus;43864155]I did. It was because of Win8.1 bug though. Fixed it by launching with -force -d3d11.[/QUOTE] That did it, thanks
Here is another build. I managed to get the original Ricochet deathmatch map imported into Unity. I had to manually apply all the textures so they are a little sloppy. [unity]https://dl.dropboxusercontent.com/u/38836617/ricoshit.unity3d[/unity]
Not half bad. If you need help importing more advanced source models, with animations and such. I could probably help you out.
After stopping where I used to work part-time, with Unity3D, I now got a full-time internship working with, guess what, Unity3D. It's taking over the world. [editline]11th February 2014[/editline] Also I'll be responsible for basically the entire game except networking. It's a year-long project. I wonder how much I'll hate Unity at the end of this.
[QUOTE=Asgard;43869792]After stopping where I used to work part-time, with Unity3D, I now got a full-time internship working with, guess what, Unity3D. It's taking over the world. [editline]11th February 2014[/editline] Also I'll be responsible for basically the entire game except networking. It's a year-long project. I wonder how much I'll hate Unity at the end of this.[/QUOTE] You need at least two people so that you can tell each other that the other person's scripts are shit. It's a healthy part of a development process.
[QUOTE=Asgard;43869792]After stopping where I used to work part-time, with Unity3D, I now got a full-time internship working with, guess what, Unity3D. It's taking over the world. [editline]11th February 2014[/editline] Also I'll be responsible for basically the entire game except networking. It's a year-long project. I wonder how much I'll hate Unity at the end of this.[/QUOTE] to be honest, for me as soon as something becomes a 'job' I start to hate it. Hopefully the same doesn't apply for you, good luck.
Sorry, you need to Log In to post a reply to this thread.