• Unity3D - Discussion
    5,004 replies, posted
I just bought play maker and it's great, with just 2 hours of work i did progress :v
[unity]https://dl.dropboxusercontent.com/u/251205348/ShareX/2014-03/web.unity3d[/unity] Press on the screen for place the rope and use W and S for decrease the size, and A D for push the block
[img]http://i.imgur.com/3iu2vGF.gif[/img] [img]http://i.imgur.com/GV2KLrS.gif[/img] [t]https://31.media.tumblr.com/f636da3ca0e0a2a3dcf2ddd64a53335c/tumblr_n2bd78IePj1r9waklo2_1280.png[/t] [t]http://i.imgur.com/dKBgNs9.png[/t] I've been working on a not so little pet project of mine for a week now. I've had the idea of how I would make a game where you control a capital ship as opposed to a fighter in my head for a long time. This is basically that game, but boiled down to its essentials. This is way too big for me to realistically expect this to ever be finished, but it's a fun diversion when I feel the need to be productive. I've been keeping track of the thing for myself [url=https://docs.google.com/document/d/1r4pg-8-_qDPIcHFr65VWAcy6MHxUAwrACDNVoCVcQCM/edit?usp=sharing]in a document that I've been filling out as I go[/url]. It's pretty sparse in the implementation, but it's a good way for me to write down rules that I can program by. Before today, here's how far I've gotten: - Ship physics and controls - 2 control modes: manual and guided - 5 weapon groups that can be switched between - Turrets that can have up to 3 barrels - Turrets with firing animations - Turrets are constrained to rotating on any arbitrary base - Turrets can have constraints on azimuth and heading, along with specified turn rate - Aimpoint system which is used for aiming the turrets - When a weapon group is slaved to the camera crosshair, the turrets aim where you aim - An aimpoint can be assigned and "stuck" to any target, when this happens turrets will aim at it - When an aimpoint is assigned for a group, that group can be toggled to autofire on that aimpoint - Each turret is assigned a different bullet to fire with a specified rate of fire - Can be fired alternating barrels or all at once (depends on how turret is set up as well) - Bullets collide with and apply damage to ships - Ships can be destroyed once HP is depleted As of today: - Effects added for engines, bullets, and muzzle flashes - Weapon groups are now fully functional - Bullets scale based on distance to the camera to make them easier to track For the time being, I'm just using models from Homeworld 2. Sorry for the length of the post, but it's my "intro" post and the first time I post anything in this thread. Everything beyond this should be pretty short.
Looks really cool.
[QUOTE=Why485;44252400]Sorry for the length of the post, but it's my "intro" post and the first time I post anything in this thread. Everything beyond this should be pretty short.[/QUOTE] Looking great dude. And don't worry about that, this thread needs more action anyway.
[QUOTE=johnnyaka;44244507]Can someone explain me why my GUI Text is postioned totaly wrong? Or am I just thinking dumb? O.o Scene (The marked one is the GUI Text, other one is the camera): -snip- Game: -snip-[/QUOTE] /push Checked all Positions, they are all 0,0,0 excpet GUI Text.
What GUI do you guys recommend? NGUI, or Daikon Forge?
Can someone give recommend a way to learn how to make guis and animate
[img]http://i.imgur.com/Yt8z6HF.png[/img] It's a minor thing, but I was putting off adding random bullet deviation because I couldn't think of an intuitive and simple way to do it. While searching for something unrelated, I came across a really simple way to do it. [code]Vector3 deviation = Random.insideUnitCircle * (dispersionAngle * Mathf.Deg2Rad); deviation = FireParent.TransformDirection(deviation); Vector3 randomizedForward = FireParent.forward + deviation;[/code] Random.insideUnitCircle will give a random direction in the x and y components. TransformDirection converts that local X/Y into world coordinates. Then, when added to your forward direction you get the forward with a random deviation of "dispersionAngle." When multiplied by Deg2Rad, the dispersion angle appears to match up perfectly to how many degrees off the forward axis the bullet can possibly go. For example, if you use 1, this means the bullet can fly at most left 1 degree or right one degree. I wasn't expecting it to line up that nicely, but it seems to and that's great. Not a complicated or difficult thing to do, but it's a neat little nugget somebody might find useful. Meanwhile on my own thing today (inbetween completing an online course because of a speeding ticket I got) I cleaned up my layers, added this random deviation, simplified targeting to not allow yourself to be targeted, and did some re-factoring of the turret fire control to get rid of hastily written copy/pasted code.
Does anyone have a suggestion on how to distribute grass-sprites on my (model) terrain? I have multiple islands, which are vertexpainted to blend between textures. The distribution of the grasssprites should work in a similar manner, maybe use the brightness/alpha of the vertexpainting, so it can all be handled in one mask. Do you have any suggestions/ examples how I would make a script that distributes grasssprites on the mesh, taking vertexpaint into account? Any input is greatly apprechiated :) [thumb]https://dl.dropboxusercontent.com/u/36498915/unity.PNG[/thumb] Also, why isn't there a Unity-forum on FP yet?
[vid]https://dl.dropboxusercontent.com/u/22104913/Tiles.mp4[/vid] Originally wanted to make this as a source map years ago, but never did.
[QUOTE=Freakrules;44264260]Also, why isn't there a Unity-forum on FP yet?[/QUOTE] There is one, you're in it
[QUOTE=Huabear;44264494]There is one, you're in it[/QUOTE] While this is only a thread, I do agree with Freakrules. it'd be certainly nice to have a special Unity forum too.
I don't think this thread is active enough to warrant an entire forum.
[img]http://24.media.tumblr.com/5e0972e7524ac083cca52ff11d7e4156/tumblr_n2kk3kGkVy1r9waklo1_r1_500.gif[/img] [img]http://24.media.tumblr.com/615128ae317b15311032cd747d507e10/tumblr_n2kk3kGkVy1r9waklo2_r1_500.gif[/img] We flak now. Turns out Unity already has a sphere based raycast. I completely re-wrote my bullet hit detection last night. The old system used spheres and some script I found online and it still fell apart even at relatively slow speeds of only 100m/s or so. I threw out all of that and instead cast a ray every frame forwards about as long as it would take to travel in one frame. This is significantly simpler, literally only 5 lines of code, and works [I]so[/I] much better. I had trouble with bullets clipping at 100m/s before, now I can do 5000m/s with ease. I was astonished both by how easy this was to write and by how well it works. This kind of bullet hit detection should really be a built in component of Unity. It's an extremely common use case, and doing bullet hit detection the naive way in Unity has a great many drawbacks. Am I missing something here? [editline]17th March 2014[/editline] Now that I'm on my home computer, here's the code for it. You might want to add a multiplier to velocity like 1.5 to account for frame time variance. [code] // Create ray for raycast. RaycastHit rayHit; Ray forwardRay = new Ray(ownTransform.position, ownTransform.forward); // Perform raycast using the velocity of the bullet and an appropriate hitmask. "rayHit" gives information on what was hit. bool rayWasHit = Physics.Raycast(forwardRay, out rayHit, velocity * Time.deltaTime, hitMask); // When a hit is detected, apply damage if destructible and apply splash damage if needed. if (rayWasHit) { // Apply your damage here } [/code]
Is it possible to specify an angle between 0 - 360 for a GameObject to rotate smoothly towards on the Y axis? I hate doing rotation so -so- much.
[QUOTE=Asgard;44265867]Is it possible to specify an angle between 0 - 360 for a GameObject to rotate smoothly towards on the Y axis? I hate doing rotation so -so- much.[/QUOTE] Is this what you want? [url]http://docs.unity3d.com/Documentation/ScriptReference/Mathf.LerpAngle.html[/url] There's also these [url]http://docs.unity3d.com/Documentation/ScriptReference/Mathf.MoveTowardsAngle.html[/url] [url]http://docs.unity3d.com/Documentation/ScriptReference/Mathf.SmoothDampAngle.html[/url]
Unity 5 was announced at GDC [QUOTE]Unity 5 — billed as "a massive update" to the multiplatform game engine and toolkit — was unveiled today at Game Developers Conference 2014. Unity Technologies, makers of the suite, said Unity 5 will overhaul the game's audio toolset and deliver upgraded lighting and and a physically based shader system. It now is a 64-bit engine with this release, Unity Technologies added. Of note, Unity 5 will also include the launch of a cross-promotion neetwork for mobile games called Unity Cloud, "enabling mobile game developers to run full-screen interstitial ads in their mobile games, as well as exchange ad units with other Unity developers." The last full version, Unity 4 launched two years ago. Unity supports development on all mobile OSes, plus Windows, MacOS and Linux, the PS3, PS Vita, Xbox 360 and Wii U. Games developed with Unity range from acclaimed indie titles like Gone Home, to mobile hits like Temple Run, to the upcoming Wasteland 2 on PC.[/QUOTE]
lol thank god I got the student edition of unity 4
[QUOTE=dmillerw;44268934]Unity 5 was announced at GDC[/QUOTE] Source link?
[QUOTE=thomasfn;44269118]Source link?[/QUOTE] Looks like the sites that posted it broke the embargo date. Seems like this will be announced officially later today. [url]http://forum.unity3d.com/threads/234725-Unity-5-Announced[/url]
[QUOTE=Freakrules;44264260]Does anyone have a suggestion on how to distribute grass-sprites on my (model) terrain? I have multiple islands, which are vertexpainted to blend between textures. The distribution of the grasssprites should work in a similar manner, maybe use the brightness/alpha of the vertexpainting, so it can all be handled in one mask. Do you have any suggestions/ examples how I would make a script that distributes grasssprites on the mesh, taking vertexpaint into account? Any input is greatly apprechiated :) [thumb]https://dl.dropboxusercontent.com/u/36498915/unity.PNG[/thumb] Also, why isn't there a Unity-forum on FP yet?[/QUOTE] I've been trying to get the hang around vertex painting with Shader Forge, but that stupid vertex painting plugin has been some issue to get it to work right. Right, while on topic, the only thing I could think of is to do it via Unity Editor Script. By simply getting all the vertices from the mesh you have selected, you can get the vertex color, and then do a if statement, where a certain threshold would spawn a grass gameobject around that vertices. Like threshold vs radius vs lerp of "red" channel the vertex has. However if you're aiming for a real time grass thing, I have no idea.
[url]http://unity3d.com/unity/faq[/url] [quote=FAQ] [b]What is happening with the new GUI system?[/b] The new GUI system will be in Unity 4.6, which will be released this Spring.[/quote]
[QUOTE=Z_guy;44278102][url]http://unity3d.com/unity/faq[/url][/QUOTE] I've been putting off even starting GUI for my project because I just don't want to deal with this right now. All my planned GUI has been designed around working around Unity's GUI. Showcase video for Unity 5 is up. Lots of shiny rendering options and a possible glimpse at the new GUI stuff. [media]http://www.youtube.com/watch?v=tSfakMeW0lw[/media]
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]
Anyone could help me with this. How would I make it so if the velocity is 0 and I hold moveH the object will rotate. It is sort of working but the problem is that the object it's rotating in a circle(it has a radius) It's not simply like when using the rotate tool. [code] //Speed Variables var speed : int = 5; var defaultSpeed : int = 5; var startSpeed : int = 0; var maxVelocityChange : int = 10.0; //Camera Variables var turnSpeed : float = 2.0; //Private Variables private var x : float; function FixedUpdate () { var moveH = Input.GetAxis("Horizontal"); var moveV = Input.GetAxis("Vertical"); var moveJump = Input.GetAxis("Powers"); var moveNitro = Input.GetAxis("Nitro"); if (grounded) { // Calculate how fast we should be moving var targetVelocity = new Vector3(moveH, 0, moveV); targetVelocity = transform.TransformDirection(targetVelocity); targetVelocity *= speed; // Apply a force that attempts to reach our target velocity var velocity = rigidbody.velocity; var velocityChange = (targetVelocity - velocity); velocityChange.x = Mathf.Clamp(velocityChange.x, -maxVelocityChange, maxVelocityChange); velocityChange.z = Mathf.Clamp(velocityChange.z, -maxVelocityChange, maxVelocityChange); velocityChange.y = 0; rigidbody.AddForce(velocityChange, ForceMode.VelocityChange); } if(moveH && targetVelocity != 0) { x = moveH * turnSpeed; } else { x = 0; } print(targetVelocity); transform.Rotate(0,x,0); } [/code]
I have a question about particle systems. I'm using the razer hydra to act as a magic wand, and I want a particle system at the tip of the wand, for example, fire to symbolize a fireball spell. What is the best way to do things such as this? Any good tutorials you guys could recommend? EDIT Why is this getting dumbs? I don't think a beginner looking for help on particle systems is a dumb question is it?
So uh, does anyone know if it is impossible to remove the buffered RPC calls on objects that were Network.Instantiated from a client? I can't seem to be able to do that
[QUOTE=Over-Run;44298133]I have a question about particle systems. I'm using the razer hydra to act as a magic wand, and I want a particle system at the tip of the wand, for example, fire to symbolize a fireball spell. What is the best way to do things such as this? Any good tutorials you guys could recommend? EDIT Why is this getting dumbs? I don't think a beginner looking for help on particle systems is a dumb question is it?[/QUOTE] Maybe you could start from here [url]https://www.assetstore.unity3d.com/#/content/7953[/url] [editline]21st March 2014[/editline] [QUOTE=Z_guy;44278102][url]http://unity3d.com/unity/faq[/url][/QUOTE] hum...Sorry, but when will be their Spring (I don't want to wait 6 months more)
So now they've moved the 4.6 update from Spring to Summer. And then they will surely postpone it again or unknown reasons.
Sorry, you need to Log In to post a reply to this thread.