[QUOTE=Skibur;44528367]Motion Blur do require render to texture, as well as other post processing effects. Even so, slapping a refraction texture on a plane in front your camera won't do, since refraction is also part of Unity pro feature.
To be honest, there has to be a good reason why you want motion blur for your game. It uses a lot of performance in terms of CPU processing.
Also, just a quick post, I can show you something.
[t]https://dl.dropboxusercontent.com/u/10242817/Screenshot%202014-04-12%2012.38.16.png[/t][/QUOTE]
Late reply but I am working on a racing game so it's definitely needed. I'll probably get pro near release if that ever happens, I've hit a bit of a hump lately with the mixed feedback I'm getting.
My school put Unity Pro licenses on two of our computers in class and I happen to be sitting at one.
Once I get back from spring break I will have time to mess around with some of the features that are locked in the free version. :dance:
[QUOTE=gonzalolog;44484241]Oh my fu@#$ god, just switched to visual studio! It's freaking amazing
Building a kind of tile editor :v
[unity]https://dl.dropboxusercontent.com/u/251205348/ShareX/2014-04/html.unity3d[/unity]
I think that's not that hard to use, [url]https://db.tt/KlHHm5gz[/url]
This support lighting and normal maps, it's really basic i guess...So at least use this for learn
[IMG]http://i.imgur.com/x5gevhh.jpg[/IMG]
[IMG]http://i.imgur.com/BITGlAD.jpg[/IMG]
How to use:
>Import package
>Create other: Tile Meshed
>Set the texture2d
>Set the normal map if you have one
>Set the tiles on x and Y
I recommend set the snap grid to 0.32f[/QUOTE]
I was making the same thing. I am using prefabs to instantiate it.
[IMG]http://puu.sh/89D3t.png[/IMG] [IMG]http://puu.sh/89Drd.png[/IMG] [IMG]http://puu.sh/89Dqu.png[/IMG]
But I have just one problem. If I instantiate a prefab it is not linked to prefab. So if I want to change example the texture so I have to make it one by one... that is annoying. I haven't solution for it right now :S
A script on one of my gameobjects is being disabled when I press play but I can't figure out why. Is there a way to find out what's calling the script.enabled = false?
[editline]edit[/editline]
Nevermind. I looked at the editor log file, found a null reference exception, and when I fixed that it started working again.
[QUOTE=sarge997;44507299]You should throw some Lerp on there, so it doesn't instantly pop to the wand.
Unless its a level 90 spell or something.. :v:[/QUOTE]
Just wondering, how exactly does Lerp work?
The code I have for getting the object is this:
[CODE] //Once in catch state, move the object to the player, go to Occupied state
else if(physicsSpellState == PhysicsSpellState.Catch){
rigid.MovePosition(transform.position + transform.forward * holdDistance);
if(!(isSelectedSpell && SixenseInput.Controllers[1].GetButtonDown(SixenseButtons.BUMPER)))
physicsSpellState = PhysicsSpellState.Occupied;
}
//When occupied, keep object in front of player, checks if bumper or trigger is pressed. If trigger, go to Charge state, else if Bumper go to Release state
else if(physicsSpellState == PhysicsSpellState.Occupied){
rigid.MovePosition(transform.position + transform.forward * holdDistance);
if(isSelectedSpell && SixenseInput.Controllers[1].Trigger != 0.0)
physicsSpellState = PhysicsSpellState.Charge;
else if(isSelectedSpell && SixenseInput.Controllers[1].GetButtonDown(SixenseButtons.BUMPER))
physicsSpellState = PhysicsSpellState.Release;
}[/CODE]
Also, anybody have any ideas for other magic spells I can incorporate. I have 3 so far and I need a 4th.
Each spell has 2 functions: Light Spell(Pressure sensitive light, shoot light), Physics Spell(Levitation and force push), Fire spell(Fireball and flamethrower).
For the 4th I was thinking like a healing spell but its sort of lame.
[QUOTE=Over-Run;44557547]Just wondering, how exactly does Lerp work?
The code I have for getting the object is this:
[CODE] //Once in catch state, move the object to the player, go to Occupied state
else if(physicsSpellState == PhysicsSpellState.Catch){
rigid.MovePosition(transform.position + transform.forward * holdDistance);
if(!(isSelectedSpell && SixenseInput.Controllers[1].GetButtonDown(SixenseButtons.BUMPER)))
physicsSpellState = PhysicsSpellState.Occupied;
}
//When occupied, keep object in front of player, checks if bumper or trigger is pressed. If trigger, go to Charge state, else if Bumper go to Release state
else if(physicsSpellState == PhysicsSpellState.Occupied){
rigid.MovePosition(transform.position + transform.forward * holdDistance);
if(isSelectedSpell && SixenseInput.Controllers[1].Trigger != 0.0)
physicsSpellState = PhysicsSpellState.Charge;
else if(isSelectedSpell && SixenseInput.Controllers[1].GetButtonDown(SixenseButtons.BUMPER))
physicsSpellState = PhysicsSpellState.Release;
}[/CODE]
Also, anybody have any ideas for other magic spells I can incorporate. I have 3 so far and I need a 4th.
Each spell has 2 functions: Light Spell(Pressure sensitive light, shoot light), Physics Spell(Levitation and force push), Fire spell(Fireball and flamethrower).
For the 4th I was thinking like a healing spell but its sort of lame.[/QUOTE]
Lerp works by interpolating two values by a number between 0 and 1.
So, for example. you do the following:
Mathf.Lerp( 0, 10, 0.5f );
The first parameter is the first value, the second parameter is the second value, and the third parameter is how much the two values should interpolate.
This example would return the number '5'. If the 3rd parameter was '0', the Lerp would return '0'. If the 3rd parameter was '1', the Lerp would return '10'. If the 3rd parameter was '0.25f', the Lerp would return '2.5f'.
What this allows you to do is smoothly move a thing from Vector3 A to Vector3 B as following:
[code]
Vector3 A = new Vector3( 0, 0, 0 );
Vector3 B = new Vector3( 10, 25, 201 );
float TimeToLerp = 4; // The amount of seconds it should take to move something from A to B
float lerpTimer = 0f;
void Update() {
lerpTimer += Time.deltaTime / TimeToLerp; // We add the time since the last frame to the timer, and divide it by the amount of seconds it should take.
// If we keep adding Time.deltaTime, the lerp would take 1 second.
transform.position = Vector3.Lerp( A, B, lerpTimer ); // Lerp from A to B by value. If lerpTimer goes over '1', it won't do anything.
}
[/code]
So what you could do is Lerp the object's original position to your wand's position by a certain amount of seconds.
[QUOTE=MaZy;44551325]
But I have just one problem. If I instantiate a prefab it is not linked to prefab. So if I want to change example the texture so I have to make it one by one... that is annoying. I haven't solution for it right now :S[/QUOTE]
Click on your prefab, make changes and then in Inspector, at top near Prefab label, click Apply, so changes will apply to all prefabs.
[QUOTE=Asgard;44560008]Lerp works by interpolating two values by a number between 0 and 1.
[code]
Vector3 A = new Vector3( 0, 0, 0 );
Vector3 B = new Vector3( 10, 25, 201 );
float TimeToLerp = 4; // The amount of seconds it should take to move something from A to B
float lerpTimer = 0f;
void Update() {
lerpTimer += Time.deltaTime / TimeToLerp; // We add the time since the last frame to the timer, and divide it by the amount of seconds it should take.
// If we keep adding Time.deltaTime, the lerp would take 1 second.
transform.position = Vector3.Lerp( A, B, lerpTimer ); // Lerp from A to B by value. If lerpTimer goes over '1', it won't do anything.
}
[/code]
So what you could do is Lerp the object's original position to your wand's position by a certain amount of seconds.[/QUOTE]
Ah okay that makes sense man thanks.
Any chance you could help me out with how I could get it working for the code I posted. I'm just not sure does it have to be before the rigid.MovePosition part or after it or what?
EDIT
This is what I have but it does the same snap motion so sort of stuck with it
[code] else if(physicsSpellState == PhysicsSpellState.Catch){
lerpTimer += Time.deltaTime / TimeToLerp;
rigid.MovePosition(Vector3.Lerp(rigid.position,transform.position + transform.forward * holdDistance, lerpTimer));[/code]
[QUOTE=Over-Run;44561346]Ah okay that makes sense man thanks.
Any chance you could help me out with how I could get it working for the code I posted. I'm just not sure does it have to be before the rigid.MovePosition part or after it or what?[/QUOTE]
[code]
Vector3 originalPos;
float timer;
/**
* This sets the lerp's original position and it sets the timer to 0.
* The lerp movement should be constant, so make sure to only call this once, when you're actually catching the object.
*/
void CatchObject( GameObject target ) {
originalPos = target.transform.position;
timer = 0f;
}
void Update() {
...
//Once in catch state, move the object to the player, go to Occupied state
else if( physicsSpellState == PhysicsSpellState.Catch ) {
// Add the seconds to the timer. The 0.5f means the lerp will take half a second no matter the distance from the object towards you.
timer += Time.deltaTime / 0.5f;
// Move the rigid by Lerp amount. Lerp( from, to, seconds )
rigid.MovePosition( Vector3.Lerp( originalPos, transform.position + transform.forward * holdDistance, timer ) ); // Move the object towards you by lerp amount
if( !( isSelectedSpell && SixenseInput.Controllers[1].GetButtonDown( SixenseButtons.BUMPER ) ) )
physicsSpellState = PhysicsSpellState.Occupied;
}
}
[/code]
Something like this
[editline]16th April 2014[/editline]
[QUOTE=Over-Run;44561346]
EDIT
This is what I have but it does the same snap motion so sort of stuck with it
[code] else if(physicsSpellState == PhysicsSpellState.Catch){
lerpTimer += Time.deltaTime / TimeToLerp;
rigid.MovePosition(Vector3.Lerp(rigid.position,transform.position + transform.forward * holdDistance, lerpTimer));[/code][/QUOTE]
That could happen if the value of TimeToLerp is 0. C# doesn't mind dividing by zero, but the result will be ∞
I did what you said but it still snaps unfortunatly.
I uploaded the class to pastebin if you want to have a look at it.
[url]http://pastebin.com/F3xcFdXb[/url]
Any ideas?
[QUOTE=Over-Run;44561581]I did what you said but it still snaps unfortunatly.
I uploaded the class to pastebin if you want to have a look at it.
[URL]http://pastebin.com/F3xcFdXb[/URL]
Any ideas?[/QUOTE]
Can you log the lerpTimer value for me? To see if it goes from 0 to 1
[editline]16th April 2014[/editline]
I'm done at work so I'll be away for an hour or so. Debug log everything, including what the Vector3.Lerp returns.
[url]http://puu.sh/8b3JB.jpg[/url]
Theres a picture of the inspector.
It isn't going to 1 anyway.
[QUOTE=TuLiq;44543759]Yes that is correct, however adding an outline shader to every material in my gameobject gives me outllines around every model, and I want the outline only to display around the bounds of my gameobject.[/QUOTE]
You can try combining mesh then applying shader on it?
[editline]16th April 2014[/editline]
Hey hey hey guys! I have one fucking annoying problem!
I have horrible stuttering with everything in game when VSYNC is turned on. (both Vblank and every second Vblank). Ok problem is everywhere. In editor and on all mobiles!
The stutter happen every second or every half second.. and it is very ANNOYING, I won't and can't move on until I fix this shit.
I mean c'mon, without vsync I get 1000FPS (PC) and on tablet (Nexus 7) it works smooth without vsync.
And I heavily doubt it is my code because:
1. Rigidbody: It is interpolated (unity rigidbody settings)
2. Visualbody: In Update function it is Lerped to Rigidbody. Both position and rotation
3. Camera: In LateUpdate it is Lerped to VisualBody. Both position and rotation
Also I removed everything heavy from scene to gain maximal FPS.
[QUOTE=HeatPipe;44562054]You can try combining mesh then applying shader on it?[/QUOTE]
Hm! That might work. Good suggestion.
Also [URL="http://www.svgsch.at/shootmen_alpha"]http://www.svgsch.at/shootmen_alpha[/URL]
Thought I'd post this here. It's a thing I'm working on with a friend. He models, I script. It's a 2.5D soldat-esque game with gloriously glitchy grapple hook mechanics. Just for fun, and to learn a bit about game development and networking.
[QUOTE=TuLiq;44563856]Hm! That might work. Good suggestion.
Also [URL="http://www.svgsch.at/shootmen_alpha"]http://www.svgsch.at/shootmen_alpha[/URL]
Thought I'd post this here. It's a thing I'm working on with a friend. He models, I script. It's a 2.5D soldat-esque game with gloriously glitchy grapple hook mechanics. Just for fun, and to learn a bit about game development and networking.[/QUOTE]
Hehe, cool concept! :D Just kind of empty but yeah it is alpha.
I'm having a collider problem here. When my game starts, my lander has an initial velocity even though there isn't anything in the scene for it to collide with or exert a force on it. I debugged the velocity magnitude and in OnStart(), the velocity is zero. In Update() the velocity is 0.07769718. So I checked for a collision and it is colliding with something even though there isn't anything to collide with.
I debugged the name of the colliding object; it's colliding with itself.
I debugged the InstanceID of the collider; it doesn't exist in the scene.
Debug.Log()'ing the gameObject.Find( instanceID).name throws a null reference exception.
I debugged the collision.relativeVelocity.magnitude and that's zero.
What the fuck?
So I started disabling components and shit and when I set the mesh collider to concave instead of convex, the problem disappeared. But I need it to be convex.
Any ideas?
What Level of knowledge of C# should I have to start scripting in Unity without any problems?
[QUOTE=Pelf;44571928]I'm having a collider problem here. When my game starts, my lander has an initial velocity even though there isn't anything in the scene for it to collide with or exert a force on it. I debugged the velocity magnitude and in OnStart(), the velocity is zero. In Update() the velocity is 0.07769718. So I checked for a collision and it is colliding with something even though there isn't anything to collide with.
I debugged the name of the colliding object; it's colliding with itself.
I debugged the InstanceID of the collider; it doesn't exist in the scene.
Debug.Log()'ing the gameObject.Find( instanceID).name throws a null reference exception.
I debugged the collision.relativeVelocity.magnitude and that's zero.
What the fuck?
So I started disabling components and shit and when I set the mesh collider to concave instead of convex, the problem disappeared. But I need it to be convex.
Any ideas?[/QUOTE]
Don't use a mesh collider or model the collision geometry manually (not sure if you've done this)?
[QUOTE=Krizzu;44574377]What Level of knowledge of C# should I have to start scripting in Unity without any problems?[/QUOTE]
Hard to say - the more the better. If you have experience with a different language, picking up C# as you go might not be a problem. If you've never programmed before, I would recommend following some more general "Learn C#" tutorials first to at least get a hang of variables, functions and classes. That said, there's things like [URL="http://catlikecoding.com/unity/tutorials/"]http://catlikecoding.com/unity/tutorials/[/URL] which seems to want to teach C# in the context of Unity scripting and that might work for you.
[QUOTE=MokTok;44575090]
Hard to say - the more the better. If you have experience with a different language, picking up C# as you go might not be a problem. If you've never programmed before, I would recommend following some more general "Learn C#" tutorials first to at least get a hang of variables, functions and classes. That said, there's things like [URL="http://catlikecoding.com/unity/tutorials/"]http://catlikecoding.com/unity/tutorials/[/URL] which seems to want to teach C# in the context of Unity scripting and that might work for you.[/QUOTE]
Thank You very much for answer. I'm currently learning C# and it's not my first langugage, so I will be fine, I guess :v:
[QUOTE=Pelf;44571928]I'm having a collider problem here. When my game starts, my lander has an initial velocity even though there isn't anything in the scene for it to collide with or exert a force on it. I debugged the velocity magnitude and in OnStart(), the velocity is zero. In Update() the velocity is 0.07769718. So I checked for a collision and it is colliding with something even though there isn't anything to collide with.
I debugged the name of the colliding object; it's colliding with itself.
I debugged the InstanceID of the collider; it doesn't exist in the scene.
Debug.Log()'ing the gameObject.Find( instanceID).name throws a null reference exception.
I debugged the collision.relativeVelocity.magnitude and that's zero.
What the fuck?
So I started disabling components and shit and when I set the mesh collider to concave instead of convex, the problem disappeared. But I need it to be convex.
Any ideas?[/QUOTE]
I found the problem. I was spawning another prefab then disabling it a frame later. That prefab and the lander were both spawning at the origin so they would spawn inside each other and shoot apart. No idea why the lander said it was colliding with itself though.
[QUOTE=Krizzu;44560392]Click on your prefab, make changes and then in Inspector, at top near Prefab label, click Apply, so changes will apply to all prefabs.[/QUOTE]
That doesn't work. I tried it already.
I do not instantiate it runtime (ingame). I do it in the scene. Like I said. It is not linked. :(
So I switched from MD to Visual studio 2013 with Resharper after hearing how good it is in the thread - this turned out to be an excellent decision, but I've run into an oddity which I hope someone could explain; sometimes when I open a file VS prompts me that the file I've opened has been "modified outside of the environment" - I've been told this is because the file is on a different drive to the one VS is running on? Is there a decent solution? Which option should I pick - reload? I've even ticked "Auto load changes if saved" under "Detect when file is changed outside of the environment" but the prompt keeps coming up
[QUOTE=MaZy;44579106]That doesn't work. I tried it already.
I do not instantiate it runtime (ingame). I do it in the scene. Like I said. It is not linked. :([/QUOTE]
Just a guess, but are you perhaps talking about nested prefabs? They aren't supported in Unity just yet as far as I know, but are planned to be
[QUOTE=The Rizzler;44580547]So I switched from MD to Visual studio 2013 with Resharper after hearing how good it is in the thread - this turned out to be an excellent decision, but I've run into an oddity which I hope someone could explain; sometimes when I open a file VS prompts me that the file I've opened has been "modified outside of the environment" - I've been told this is because the file is on a different drive to the one VS is running on? Is there a decent solution? Which option should I pick - reload? I've even ticked "Auto load changes if saved" under "Detect when file is changed outside of the environment" but the prompt keeps coming up[/QUOTE]
I get this. I just click reload.
[editline]18th April 2014[/editline]
I only get it when I open Unity with VS already open
I just click Reload All.
This happens because files are modified in Unity :) Like creating new file, modifying, renaming, and all that stuff that requires reloading files.
As for different disk, I don't think it matters really if VS is on different drive?
[QUOTE=HeatPipe;44586063]I just click Reload All.
This happens because files are modified in Unity :) Like creating new file, modifying, renaming, and all that stuff that requires reloading files.
As for different disk, I don't think it matters really if VS is on different drive?[/QUOTE]
Ah, is that so
Is there any way to make VS automatically choose the 'reload all' option by default or is there another option that would achieve a similar effect? I don't want the menu popping up every time :v:
I might have solved this myself by ticking "Auto load changes if saved" actually
[Editline]15:07[/Editline]
Is there a good online or program based 'task list' for game production e.g. tasks, bugs to fix, intended features etc
I'm sure I've seen a couple good ones in the past but can't remember what they were called
[QUOTE=The Rizzler;44587369]Ah, is that so
Is there any way to make VS automatically choose the 'reload all' option by default or is there another option that would achieve a similar effect? I don't want the menu popping up every time :v:
I might have solved this myself by ticking "Auto load changes if saved" actually
[Editline]15:07[/Editline]
Is there a good online or program based 'task list' for game production e.g. tasks, bugs to fix, intended features etc
I'm sure I've seen a couple good ones in the past but can't remember what they were called[/QUOTE]
We use Asana for tasks and Slack for communication.
[QUOTE=The Rizzler;44587369]Is there a good online or program based 'task list' for game production e.g. tasks, bugs to fix, intended features etc
I'm sure I've seen a couple good ones in the past but can't remember what they were called[/QUOTE]
Pretty much any general-purpose software development bug/task tracker is suitable for game development.
I/we use Bitbucket for project hosting (usually), so tend to use its task tracker which is decent although simple (Attlassian would prefer you to buy JIRA).
I have also used bugzilla hosted on my web server which is good if you like looking at a website made by programmers (it "gets the job done" - what more could you want?) or have strange privacy concerns or something.
For smaller projects or having "unskilled" people involved you should consider a google spreadsheet, which with a small script or two you can get colour coding based on status/type and automatic sorting etc. (obviously the auto-sorting is not helpful if more than one person is trying to look at the thing). Speaking of which, if you want end users to be reporting bugs, google spreadsheet with form/s could be a good idea.
[QUOTE=The Rizzler;44587369]
Is there a good online or program based 'task list' for game production e.g. tasks, bugs to fix, intended features etc
I'm sure I've seen a couple good ones in the past but can't remember what they were called[/QUOTE]
I use [URL="https://trello.com/"]Trello[/URL], and so does [URL="https://trello.com/b/lG8jtz6v/rust-main"]Facepunch Studios for Rust[/URL].
Markers for things off-screen
[vid]https://dl.dropboxusercontent.com/u/13781308/Videos/Offscreen%20Markers.mp4[/vid]
Now how to make the boxes into arrows that point at the object.
Working on a fps system just for fun. The bullets can also ricochet and have tracers.
[video=youtube;QYT2nPBzS30]http://www.youtube.com/watch?v=QYT2nPBzS30[/video]
Does anyone know how to make a decent fps camera? The one I'm currently using keeps stuttering whenever I move, cause the camera is parented to a rigidbody. If I comment out the lines that control camera rotation, the stuttering goes away. I have interpolation set to on on the rigidbody.
Sorry, you need to Log In to post a reply to this thread.