• Unity3D - Discussion
    5,004 replies, posted
[QUOTE=Pelf;44972609]wtf is transform order? This is really pissing me off. [editline]1st June 2014[/editline] In other news, my asteroid character controller is working quite nicely.[/QUOTE] *look down* *see your tits* hmmm Trespasser vibes
[QUOTE=Tamschi;44973260]Why is the sun moving but not the stars?[/QUOTE] haha didn't realize that. The asteroid is stationary and the sun/directional light rotates. Thanks for pointing that out.
I haven't been posting much of any progress here in this thread, but I've been working on this in essentially every minute of my free time since last weekend. It's an amazing feeling when something you make reaches that critical mass where it's actually fun to play. This session here was when I realized that I was just playing the game for fun and not even writing or testing anything. [media]http://www.youtube.com/watch?v=aH0OHvbnO_s[/media] I think two things happened that pushed this game over the edge to becoming legitimately fun to play. The first is the dynamic camera. It turned flying from feeling like applying physics to an object to actually flying a ship. You bounce around the cockpit as the ship flies and being able to track the target from the cockpit adds awareness that you're in a ship. The second is that I tweaked the HP/damage values so that things don't just die right away and it's actually playable. Before, you were dead in 3 seconds if something actually decided to target you. The AI is the most unfinished part of this all. Turrets are 100% complete, ships all do pretty much everything they need to do, and targeting is turning out to be more robust than I thought, even with its basic usage. I'm rapidly running out of things to do to move forward that doesn't require a smarter AI. I'm still using Freespace models but the game is set up in such a way that swapping out the models to add new ships/weapons/sounds is extremely easy. I added that bomber to test that and excluding the 15 or so minutes it took to get the model game-ready, it takes only like 5 minutes from getting a model into Unity to getting it set up with the correct hardpoints and statistics and putting it fully functional ingame.
Where did you get the freespace models?
[QUOTE=Arxae;44978013]Where did you get the freespace models?[/QUOTE] I exported them from the Freespace 2 SCP Media VPs.
[QUOTE=Why485;44978019]I exported them from the Freespace 2 SCP Media VPs.[/QUOTE] There was a game called Black Prophecy (It's shut down now) and they had this neat leading target system. Basically instead of guessing where you have to shoot your projectiles to his the target, they gave you a little target instead. Here's a video, the leading target looks like a white tie fighter spinning around... [Best one to see starts at 1:09] [media]http://www.youtube.com/watch?v=00Z2G2r3LcQ&feature=youtu.be&t=1m0s[/media]
Lots of games do that but I prefer having to lead the shots yourself, otherwise it's just aim at a point on the screen and shoot.
[QUOTE=Cow Muffins;44978213]There was a game called Black Prophecy (It's shut down now) and they had this neat leading target system. Basically instead of guessing where you have to shoot your projectiles to his the target, they gave you a little target instead. Here's a video, the leading target looks like a white tie fighter spinning around... [Best one to see starts at 1:09] [media]http://www.youtube.com/watch?v=00Z2G2r3LcQ&feature=youtu.be&t=1m0s[/media][/QUOTE] There actually already is one in my game, it's just not visible. I needed one because the AI needs to know where to shoot. Here's an old debug video of the AI using their own to lead a moving target. [vid]http://dl.dropboxusercontent.com/u/15133164/Freespace%20Simulator/Unity%202014-05-31%2005-08-20-29.webm[/vid] Every gun has an optional "gimbal range" that you can assign it which means that if the lead point (calculated per gun) is within a certain angle, the gun will autoaim at it. Fighters use this to get around the issue of convergence. For the fighters this is set small enough that it's not all that noticeable, but it's there and you only really notice it when shooting at targets in the distance. You still have to pretty accurately guess the lead yourself. Right now all the fighter guns have a gimbal range of 1.5 degrees. I'm not sure if I want to add a visible lead indicator or not. At the very least I'll probably make the crosshair change when you have the correct lead (X-Wing did this) but either way I'm holding off on doing [I]any[/I] UI stuff until the 4.6 update comes out. I hate doing anything remotely UI related because of how excruciatingly painful it is, and I'm going to redo my HUD from scratch once 4.6 comes out anyway.
I have an issue I need solved and nobody on Unity Answers is responding: There's this 3rd party SDK for a motion capture system that I want to use in Unity. The SDK provides a SDK_CPP.dll and a SDK_DotNET.dll (.NET 2.0), the latter of which is just a .NET wrapper for the C++ library (so I have to distribute both dlls when using the .NET one). To get it working in Unity, I made a .NET interface library of my own, UnitySDKInterface.dll, which references the SDK_DotNET.dll and forwards some of its functions. I include my interface library in Unity. Now from what I read you have to put secondary DLLs in the base folder of Unity to get them working (so Program Files/Unity/Editor/) in the editor. I placed copies of the SDK_CPP.dll and a SDK_DotNET.dll there (plus also in the Assets/Plugins/x86/ folder alongside the interface library). So I end up with: [B]Project/Assets/Plugins/x86[/B]: UnitySDKInterface.dll SDK_DotNET.dll SDK_CPP.dll [B]Program Files (x86)/Unity/Editor[/B]: SDK_DotNET.dll SDK_CPP.dll I consistently end up getting this compile error in Unity: [code]Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.TypeLoadException: Could not load type 'UnityViconInterface.ViconInterface' from assembly 'UnityViconInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type) at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in <filename unknown>:0 at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type) [0x00000] in <filename unknown>:0 at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] in <filename unknown>:0 at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean& used_cache) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext ctx, System.Type container_type, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.ResolveContext ec, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in <filename unknown>:0 at Mono.CSharp.New.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0 [/code] Read "UnityViconInterface.ViconInterface" as "UnitySDKInterface.ClassInWhichIImportTheDotNETSDK". Thing is, I get the same error even when I don't include the SDK_CPP.dll and a SDK_DotNET.dll (just the interface dll in the project), so it seems to me that it can't load the SDK_DotNET.dll even when it's present. Any other steps I can try to undertake? :/
Is your interface library targeting .NET 2.0 as well? How are you compiling it, are you using the VS compiler?
At least for .NET plugins, you don't need them in the editor directories at all, just in your project. Don't know about native plugins, though. Additionally, your .NET DLL needs to be compiled for .NET 3.5. You get errors like that (internal compiler error) if it's set to compile for, say, .NET 4.0
My UnitySDKInterface.dll is compiled with .NET Framework 3.5 Client Profile as the target framework, using Visual Studio 2013. The interface dll itself doesn't seem to be the issue, if I remove the references to classes from the SDK_DotNET.dll, then Unity imports the it just fine.
[QUOTE=Clavus;44980181]My UnitySDKInterface.dll is compiled with .NET Framework 3.5 Client Profile as the target framework, using Visual Studio 2013. The interface dll itself doesn't seem to be the issue, if I remove the references to classes from the SDK_DotNET.dll, then Unity imports the it just fine.[/QUOTE] This sounds like Unity can't resolve the references to SDK_DotNET.dll. Are you sure it's mono compatible? Can you get the source code to the SDK so you can recompile it yourself or something?
[QUOTE=thomasfn;44980245]This sounds like Unity can't resolve the references to SDK_DotNET.dll. Are you sure it's mono compatible? Can you get the source code to the SDK so you can recompile it yourself or something?[/QUOTE] I looked around a bit and found this tool to check for Mono compatability: [url]http://mono-project.com/MoMA[/url] . I scanned the SDK_DotNET.dll with the Mono 2.6 profile (which is supposedly what Unity uses?) and this tool says it should be compatible. Sadly can't get the source anywhere. Edit: I really want to get this fixed. Tell me if you want me to PM the files so you can take a better look.
[QUOTE=KillaMaaki;44974067]Something like: [code] [System.Serializable] public class SpellInfo { public string SpellName; public AudioSource SpellSound; public Color SpellColor; } // ... // in your monobehaviour class public SpellInfo[] spells; [/code][/QUOTE] Thanks for that. So if I create 4 spells using this, what is the best way of handling the audio? Some spells have more than 1 audio source? When you say he monobehaviour class, do you mean the class I make for the spell? Like LightSpell or physics spell?
[unity]https://dl.dropboxusercontent.com/u/47513639/Ball/Ball.unity3d[/unity] I made a thing
[QUOTE=devinpro;44980497][/unity] I made a thing[/QUOTE] That could make a very fun game, but you might want to dampen the camera rotation a bit. As it stands, it rotates far too quickly, while only moving the mouse a very short distance. You might want to also make the ball more responsive to the player's input. It feels a little slow and clumsy, almost as if the ball was made of iron instead of what looks like a hollow plastic or glass.
[QUOTE=Jacen;44980879]That could make a very fun game, but you might want to dampen the camera rotation a bit. As it stands, it rotates far too quickly, while only moving the mouse a very short distance. You might want to also make the ball more responsive to the player's input. It feels a little slow and clumsy, almost as if the ball was made of iron instead of what looks like a hollow plastic or glass.[/QUOTE] I'd love to redo the whole thing though, I feel like I screwed it up completely for some reason.
Random question, has anyone made any good sports games w/ Unity? I'm at work otherwise I'd look around but if anyone has any that they know of off the top of their head, just to see if it's feasible.
Anybody have any idea when I destroy my fireball, it instantiates 2-3 fireballs sometimes? Basically it calls a destroy that just minimizes the size of the fireball over a space of time. [code] private void ShootFireBall(){ if(Time.time > FireRate + LastShot){ FireShoot.Play(); GameObject fireball = Instantiate(FireballPrefab.gameObject, SpellEmitter.transform.position, SpellEmitter.transform.rotation) as GameObject; LastShot = Time.time; } else CantShoot.Play(); }[/code] And the fireball_destroy just has this attached [code]public class Fireball_Destroy : MonoBehaviour { private const float DESTROY_TIME = 1f; void Start () { Destroy(this.gameObject,DESTROY_TIME); } } [/code] EDIT Also, some lights are giving me strange issues. When there is more than 1 in an area it seems like it makes the lights square on the ground and stuff rather than normal looking. Here is a pic [IMG]http://puu.sh/9dfqo/6c7877897b.jpg[/IMG]
Hi guys, I can't believe I've never noticed this thread! Anyway, I'm making a 2.5d platformer/dungeon crawler, and my next problem is I want to put in ledge grabbing. But the collision detection won't be tile-based, and the ledge that the player grabs onto might be sloped downward, and I don't want to have the player grab, climb into the air, and then fall onto the slope. I'll mostly be using 2d box and circle colliders for the terrain. Not using rigidbody movement for my character; only for the detection. What I've tried to do today was have a "ledge" object that I'll place into the level by hand, and it has a vector that the player will teleport to. But I would much rather have the ledges be placed programmatically, since fine-tuning where the player should move to can, and will, lead to weird jumpyness. edit: I think I'll put in a function to get a gameobject's boxcollider's leftmost and rightmost corners' locations, math something up to determine where the player should appear on the slope he climbs to, and then if he is within range of one of the corners during OnCollisionStay2D, he'll perform the grab and climb.
I am screwed I produced a bug where Gizmo is moving (for transform), but transforms coordinates are intact aka not changing. Fucking what?? Whatever it is, it is not going away so I will just ignore it
[QUOTE=HeatPipe;44996417]I am screwed I produced a bug where Gizmo is moving (for transform), but transforms coordinates are intact aka not changing. Fucking what?? Whatever it is, it is not going away so I will just ignore it[/QUOTE] Does the object have animations? If you're describing what I think, it's the animation putting the transform at 0, 0, 0.
-snip-
What's a good version control to use with my unity projects? Preferably one with less of a learning curve?
[QUOTE=Pelf;44998398]What's a good version control to use with my unity projects? Preferably one with less of a learning curve?[/QUOTE] SVN
git.. please.
I honestly prefer SVN. I find it to be much less of a PITA than Git, especially used with TortoiseSVN. There's just mainly SVN Import, backup, delete, checkout, add stuff to ignore list, commit. Then you just have to deal with two actions: Update, checks out changes from SVN, or Commit which checks in changes. I dunno, it just makes more sense to me.
[QUOTE=KillaMaaki;44998526]I honestly prefer SVN. I find it to be much less of a PITA than Git, especially used with TortoiseSVN. There's just mainly SVN Import, backup, delete, checkout, add stuff to ignore list, commit. Then you just have to deal with two actions: Update, checks out changes from SVN, or Commit which checks in changes. I dunno, it just makes more sense to me.[/QUOTE] Git is super simple. Set up. [code] git init git remote add origin url [/code] Addfiles/commit [code] git add filename or . for all git commit -m "Refactor #4544553" //push to server. git push origin master. [/code] It's faster, safer(Because it's decentralized) and better for merging(working in groups). [editline]5th June 2014[/editline] I'm not going to push any further because obviously it's a preference thing but I feel like everyone using SVN should give it a chance.
I have used GIT before. I've even written editor extensions for it at one point (a while ago I did a short stint on NinjaPvP and I wrote a simple extension which interfaced with some bash files to do pushes/pulls directly from inside the Unity Editor). I just prefer SVN. Git's not so bad once you've got the repository set up and ready to go, but I've had some pretty big headaches with this in the past.
Sorry, you need to Log In to post a reply to this thread.