Search Results

Search found 4936 results on 198 pages for 'unity 2d'.

Page 11/198 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Parse/Write JSON with Unity iOS

    - by DannoEterno
    anybody know a tutorial or maybe can help me to develop a parser/reader for JSON compatible with Unity iOS pro? I've already tried different third part libraries but without luck (i've tried json.net, jsonfx, litjson). Im pretty in hurry of doing a simple parser/writer that i can use also under iOS and not only in Desktop. P.s. i can also use third part library, but please, first of suggest be sure that it will work under iOS! Thank you all

    Read the article

  • Custom keyboard shortcut to lauch a terminal and run a command in Unity

    - by David Weinraub
    I know this should be the simplest thing, but coming up empty. ;-( I would like to create a keyboard shortcut ctrl-alt-P that opens a terminal window and runs a ping command: ping -c 4 somefixeddomain.com [Useful for quickly checking whether my internet connection is actually working.] I have attempted to do this (in Unity, Ubuntu v11.10) using: Settings > Keyboard > Custom Shortcuts filling in all the obvious stuff, but no luck. All ideas welcome.

    Read the article

  • Unity: Spin wheels to move vehicle

    - by Paul Manta
    I am just getting started with Unity and I'd like to ask a question. If I have a "Vehicle" object that has two children: "FrontWheel" and "BackWheel" (both 'wheels' are cylinders), how should I set everything up such that I can move the entire vehicle by turning its wheels? When I apply a torque to "FrontWheel", the vehicle starts to move, but instead of the whole thing the moving together, the chassis is rolling on the cylinders and eventually falls off. How can I prevent it from doing that?

    Read the article

  • Window focus confusion in unity

    - by Bryan Agee
    I like having focus prevention set to high, so that I don't have some stupid auto-launched app steal my typing in the middle of something else. Unfortunately, Unity keeps focus on the right window while raising the new one. A number of times, this has caused me to close an application by accident that had control of the menu bar, even though it was underneath the new window. Is there a way to prevent raise without focus?

    Read the article

  • Add Eclipse to Unity Dock in Ubuntu 12.04

    - by csilk
    I'm using the following eclipse.desktop file [1] on the Unity dock but I keep seeing the following error [2] in the ".xsession-errors" file everytime I click the Eclipse icon. Are there any ideas why this is happening? [1] [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Java IDE Exec=/bin/sh /home/USERNAME/eclipse/eclipse Icon=/home/USERNAME/eclipse/icon.png Categories=Application;Development;Java;IDE Version=1.0 Type=Application Terminal=0 [2] /home/USERNAME/eclipse/eclipse: 5: /home/USERNAME/eclipse/eclipse: Syntax error: "(" unexpected

    Read the article

  • Increase animation speed according to the swipe speed in unity for Android

    - by rohit
    I have the animation done through Maya and brought the FBX file to unity. Here is my code to calculate the speed of the swipe: Vector2 speedMeasuredInScreenWidthsPerSecond =(Input.touches[0].deltaPosition / Screen.width) * Input.touches[0].deltaTime; Now I wanted to take speedMeasuredInScreenWidthsPerSecond and use it to increase the animation speed accordingly like this: animation["gmeChaAnimMiddle"].speed=Mathf.Round(speedMeasuredInScreenWidthsPerSecond); However, this results in an error that I need to convert Vector2 to float. So how do I overcome it?

    Read the article

  • How can I run unity with Slim with sound

    - by Samir
    I'm trying to start the unity environment from slim display manager, everything goes fine, except by the sound that don't work, the device just dont appear in the device list I already changed the slim config file to start with this code below, but it didnt solve the problem.... login_cmd exec ck-launch-session dbus-launch /bin/bash -login /etc/X11/Xsession %session I believe the it is related with some thing that the gdm/lighdm start with the session and slim dont do that When I use the lighdm or gdm to start the environment everything works fine

    Read the article

  • adapting a Unity gravitational script to allow moons

    - by PartyMix
    I'm using this script: http://wiki.unity3d.com/index.php/Simple_planetary_orbits to get a solar system going in Unity, but it doesn't seem to support creating bodies that orbit other moving bodies (or I am using it incorrectly). Any idea about how to modify it so that it does (or just use it correctly)? I've been beating my head against this problem for a couple hours, and I really don't feel like I have any idea what I'm doing. Thanks in advance.

    Read the article

  • create launcher in unity to be opened in Terminal

    - by Automat
    I would like to make a launcher directed to an application that can only be opened in Terminal. I had it on Maverick and it worked. And also, it added the application to the Installed applications At this moment, on 11.10 I have only made the desktop launcher. If I move it to Unity, it creates a permanent launcher, and it's not in the Installed Apps menu either. I have installed gnome-tweaks-tool. Does anybody have a solution?

    Read the article

  • How can I remove the Unity Launcher?

    - by Magnus Hoff
    Unfortunately, the Unity Launcher on the left hand side of the screen takes more valuable space away than the new menu bar gives. Is there any way to get rid of the Launcher? Alternatives I would be satisfied with include: Not having the Launcher at all Having the Launcher hide automatically Having applications open on top of the Launcher (not next to it) (edit:) Note that I am specifically looking for a way to keep the global menubar, while getting rid of the Launcher.

    Read the article

  • Disk mounter applet for Unity?

    - by sdaau
    Well - just because I cannot find this asked anywhere else on the net - is there something like a "Disk Mounter" applet for Unity interface, or are there any alternatives? (By 'alternatives' I mean: I wouldn't mind doubleclicking an icon, and have what used to be a toolbar applet start up as a separate window; as long as don't have to grapple with mount command lines, and filesystem arguments and such) Thanks, Cheers!

    Read the article

  • Simple collision detection in Unity 2D

    - by N1ghtshade3
    I realise other posts exist with this topic yet none have gone into enough detail for me. I am attempting to create a 2D game in Unity using C# as my scripting language. Basically I have two objects, player and bomb. Both were created simply by dragging the respective PNG to the stage. I have set up touch controls to move player left and right; gravity of any kind is not needed as I only require it to move x units when I tap either the left or right side of the screen. This movement is stored in a script called playerController.cs and works just fine. I also have a variable health = 3 for player, which is stored in healthScript.cs. I am now at a point where I am stuck. I would like it so that when player collides with bomb, health decreases by one and the bomb object is destroyed. So what I tried doing is using a new script called playerPhysics.cs, I added the following: void OnCollisionEnter2D(Collision2D coll){ if(coll.gameObject.name=="bomb") GameObject.Destroy("bomb"); healthScript.health -= 1; } While I'm fairly sure I don't know the proper way to reference a variable in another script and that's why the health didn't decrease when I collided, bomb never disappeared from the stage so I'm thinking there's also a problem with my collision. Initially, I had simply attached playerPhysics.cs to player. After searching around though, it appeared as though player also needed a rigidBody attached to it, so I did that. Still no luck. I tried using a circleCollider (player is a circle), using a rigidBody2D, and using all manner of colliders on one and/or both of the objects. If you could please explain what colliders (if any) should be attached to which objects and whether I need to change my script(s), that would be much more helpful than pointing me to one of the generic documentation examples I've already read. Also, if it would be simple to fix the health thing not working that would be an added bonus but not exactly the focus of this question. Bear in mind that this game is 2D; I'm not sure if that changes anything. Thanks!

    Read the article

  • Lock mouse in center of screen, and still use to move camera Unity

    - by Flotolk
    I am making a program from 1st person point of view. I would like the camera to be moved using the mouse, preferably using simple code, like from XNA var center = this.Window.ClientBounds; MouseState newState = Mouse.GetState(); if (Keyboard.GetState().IsKeyUp(Keys.Escape)) { Mouse.SetPosition((int)center.X, (int)center.Y); camera.Rotation -= (newState.X - center.X) * 0.005f; camera.UpDown += (newState.Y - center.Y) * 0.005f; } Is there any code that lets me do this in Unity, since Unity does not support XNA, I need a new library to use, and a new way to collect this input. this is also a little tougher, since I want one object to go up and down based on if you move it the mouse up and down, and another object to be the one turning left and right. I am also very concerned about clamping the mouse to the center of the screen, since you will be selecting items, and it is easiest to have a simple cross-hairs in the center of the screen for this purpose. Here is the code I am using to move right now: using UnityEngine; using System.Collections; [AddComponentMenu("Camera-Control/Mouse Look")] public class MouseLook : MonoBehaviour { public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 } public RotationAxes axes = RotationAxes.MouseXAndY; public float sensitivityX = 15F; public float sensitivityY = 15F; public float minimumX = -360F; public float maximumX = 360F; public float minimumY = -60F; public float maximumY = 60F; float rotationY = 0F; void Update () { if (axes == RotationAxes.MouseXAndY) { float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX; rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotationY = Mathf.Clamp (rotationY, minimumY, maximumY); transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0); } else if (axes == RotationAxes.MouseX) { transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0); } else { rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotationY = Mathf.Clamp (rotationY, minimumY, maximumY); transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0); } while (Input.GetKeyDown(KeyCode.Space) == true) { Screen.lockCursor = true; } } void Start () { // Make the rigid body not change rotation if (GetComponent<Rigidbody>()) GetComponent<Rigidbody>().freezeRotation = true; } } This code does everything except lock the mouse to the center of the screen. Screen.lockCursor = true; does not work though, since then the camera no longer moves, and the cursor does not allow you to click anything else either.

    Read the article

  • Why using alt-tab causes Unity to restart?

    - by blade19899
    This have happened to me 4 times. When I use alt-tab Unity resets. It doesn't close any apps, but when I click an app that was already open - but minimized - I only can see the minimize/maximize/close buttons and a thin border around the window, it but nothing in it, as on the following picture: This doesn't just happen to one app, but to all my opened minimized apps. I also want to ask if I should file a bug report?

    Read the article

  • Ubuntu 12.04 despite the left panel POLI tray present, myunity says that unity turns in 2d

    - by Stef
    How do I enable unity 3d? I state that I have used the correct login to ubuntu to ubuntu and not 2d below the glxinfo stefano@WorkLinux:~$ glxinfo | grep render nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 55 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 56 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 59 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 58 nvfx_screen_get_param:95 - Warning: unknown PIPE_CAP 30 direct rendering: Yes OpenGL renderer string: Gallium 0.4 on NV34

    Read the article

  • What would be the best mean for a gui with a lot of FX in Unity

    - by Lionel Barret
    The game I am working on (we are in R&D) is based almost exclusively on a windowed gui with a lot of FX (fading, growing, etc). We will also likely need custom widgets (like a sound recording graph). The game will be made with Unity and from what I heard, the default gui system has quite a bad rep, it is too slow for many usages. So, I wondering what would be the best way to do what we need.

    Read the article

  • Remapping Alt + F2 in Unity

    - by Jesse
    I disabled the Alt + F2 default shortcut in unity (ubuntu 11.10) using ccsm and I set a new shortcut using the default system shortcut manager (system settings keyboard). And it works, until I execute a command like compiz --replace. After that, all shortcuts keep working normally, except for Alt + F2. It does nothing. Any suggetions to keep the custom Alt + F2 shortcut working after compiz --replace?

    Read the article

  • In 13.04 using Unity Tweak Tool hot corners stops working after reboot

    - by Sanseriff Sanseriff
    I have 13.04 64 bit Ubuntu installed and I'm using Unity Tweak tool to enable hot corners everything works as it should as long as I don't reboot as soon as I do hotcorners stops working. In order to get them functioning again I have to open the tweak tool and turn hotcorners off and then back on after every reboot. This I admit isn't a huge issue but is annoying is there anyway to get hotcorners to work properly after reboot with out having to reset them every time?

    Read the article

  • Can't change color of sprites in unity

    - by Aceleeon
    I would like to create a script that targets a 2d sprite "enemy" and changes their color to red (slightly opaque red if possible) when you hit tab. I have this code from a 3d tutorial hoping the transition would work. But it does not. I only get the script to cycle the enemy tags but never changes the color of the sprite. I have the code below I'm very new to coding, and any help would be FANTASTIC! HELP! hahah. TL;DR Cant get 3d color targeting to work for 2D. Check out the c#code below using UnityEngine; using System.Collections; using System.Collections.Generic; public class Targetting : MonoBehaviour { public List targets; public Transform selectedTarget; private Transform myTransform; // Use this for initialization void Start () { targets = new List(); selectedTarget = null; myTransform = transform; AddAllEnemies(); } public void AddAllEnemies() { GameObject[] go = GameObject.FindGameObjectsWithTag("Enemy"); foreach(GameObject enemy in go) AddTarget(enemy.transform); } public void AddTarget(Transform enemy) { targets.Add(enemy); } private void SortTargetsByDistance() { targets.Sort(delegate(Transform t1,Transform t2) { return Vector3.Distance(t1.position, myTransform.position).CompareTo(Vector3.Distance(t2.position, myTransform.position)); }); } private void TargetEnemy() { if(selectedTarget == null) { SortTargetsByDistance(); selectedTarget = targets[0]; } else { int index = targets.IndexOf(selectedTarget); if(index < targets.Count -1) { index++; } else { index = 0; } selectedTarget = targets[index]; } } private void SelectTarget() { selectedTarget.GetComponent().color = Color.red; } private void DeselectTarget() { selectedTarget.GetComponent().color = Color.blue; selectedTarget = null; } // Update is called once per frame void Update() { if(Input.GetKeyDown(KeyCode.Tab)) { TargetEnemy(); } } }

    Read the article

  • Ubuntu 12.04 Unity fails

    - by user54519
    I am using the latest edition of Virtualbox 4.1.12 and I get the attached when I attempt to launch Unity. Everything is there in the background but it's not displaying the launcher, dash, or panel. I've tried to reboot the VM as well as ensure all updates are installed. I've also tried removing and reinstalling the Guest Additions. I have a screenshot if you'd like to see that, but it won't let me attach it.

    Read the article

  • How can teams collaborate on Unity 3D projects?

    - by nosferat
    With a friend of mine, we are planning to develop a small game to get the hang of game development and teamwork. But since Unity 3D barely supports version control (or at least the free version lacks of it) we have no idea how to efficiently manage teamwork. Sharing tasks in a small project is also seems like a challange for us. I would also appreciate any advice that could be useful for beginner indie developers related to teamwork. :)

    Read the article

  • Ubuntu 12.10 Crashing Compiz/Unity (not Nvidia related)

    - by iamronen
    I've upgraded from 12.04 to 12.10 and compiz and/or unity are constantly crashing rendering my computer useless (no top bar, no dash, no window decorations). I have just discovered that when I login with the guest account everything seems to be working OK. I've been through all the threads I could find and haven't found a resolution. This isn't Nvidia related (I am running on a System76 laptop with ATI Radeon). Is there any way I can go about isolating the problem and restore my user account?

    Read the article

  • Unity 3D Display Lag

    - by ec2011
    I find that there is quite a lot of lag when using Unity after upgrading to Precise. It seems that when I first start up the computer, everything is fine, but then if I put the computer on standy for a while and then come back to it, the display is extremely slow and there is a significant delay to visual effects that make the system rather cumbersome to use. I tried to report this as a bug but then bug reporting tool directed me to ask this is a question here first. Thanks for any ideas

    Read the article

  • Why are my Unity procedural animations jerky?

    - by Phoenix Perry
    I'm working in Unity and getting some crazy weird motion behavior. I have a plane and I'm moving it. It's ever so slightly getting about 1 pixel bigger and smaller. It looks like the it's kind of getting squeezed sideways by a pixel. I'm moving a plane by cos and sin so it will spin on the x and z axes. If the planes are moving at Time.time, everything is fine. However, if I put in slower speed multiplier, I get an amazingly weird jerk in my animation. I get it with or without the lerp. How do I fix it? I want it to move very slowly. Is there some sort of invisible grid in unity? Some sort of minimum motion per frame? I put a visual sample of the behavior here. Here's the relevant code: public void spin() { for (int i = 0; i < numPlanes; i++ ) { GameObject g = planes[i] as GameObject; //alt method //currentRotation += speed * Time.deltaTime * 100; //rotation.eulerAngles = new Vector3(0, currentRotation, 0); //g.transform.position = rotation * rotationRadius; //sine method g.GetComponent<PlaneSetup>().pos.x = g.GetComponent<PlaneSetup>().radiusX * (Mathf.Cos((Time.time*speed) + g.GetComponent<PlaneSetup>().startAngle)); g.GetComponent<PlaneSetup>().pos.z = g.GetComponent<PlaneSetup>().radius * Mathf.Sin((Time.time*speed) + g.GetComponent<PlaneSetup>().startAngle); g.GetComponent<PlaneSetup>().pos.y = g.GetComponent<Transform>().position.y; ////offset g.GetComponent<PlaneSetup>().pos.z += 20; g.GetComponent<PlaneSetup>().posLerp.x = Mathf.Lerp(g.transform.position.x,g.GetComponent<PlaneSetup>().pos.x, .5f); g.GetComponent<PlaneSetup>().posLerp.z = Mathf.Lerp(g.transform.position.z, g.GetComponent<PlaneSetup>().pos.z, .5f); g.GetComponent<PlaneSetup>().posLerp.y = g.GetComponent<Transform>().position.y; g.transform.position = g.GetComponent<PlaneSetup>().posLerp; } Invoke("spin",0.0f); } The full code is on github. There is literally nothing else going on. I've turned off all other game objects so it's only the 40 planes with a texture2D shader. I removed it from Invoke and tried it in Update -- still happens. With a set frame rate or not, the same problem occurs. Tested it in Fixed Update. Same issue. The script on the individual plane doesn't even have an update function in it. The data on it could functionally live in a struct. I'm getting between 90 and 123 fps. Going to investigate and test further. I put this in an invoke function to see if I could get around it just occurring in update. There are no physics on these shapes. It's a straight procedural animation. Limited it to 1 plane - still happens. Thoughts? Removed the shader - still happening.

    Read the article

  • Sphere entering in to the cube.unity

    - by Parthi
    I am trying Roll a Ball unity tutorial.Everything is fine,but when I roll the ball it is moving through the cube instead of picking it. my player class is using UnityEngine; using System.Collections; public class player : MonoBehaviour { public float speed; // Use this for initialization // Update is called once per frame void Update () { float h = Input.GetAxis("Horizontal"); float v = Input.GetAxis("Vertical"); Vector3 move = new Vector3(h,0,v); rigidbody.AddForce(move * speed * Time.deltaTime); } void OnTriggerEnter(Collider other) { if(other.gameObject.tag == "Pick up") { other.gameObject.SetActive(false); } } }

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >