NDraskovic

Members
  • Content count

    101
  • Joined

  • Last visited

Community Reputation

447 Neutral

1 Follower

About NDraskovic

  • Rank
    Member

Personal Information

  • Interests
    Design
    Education
    Programming

Social

  • Twitter
    @NevenDraskovic
  1. Yeah that is the approach I'm using at the moment, I was just wandering if there is a "smarter" way. Thanks anyway.
  2. I tried with InControl, but couldn't find a way, so I'm asking for any suggestion, not only InControl, but built in Unity or some third party plug in.
  3. Hey guys, I'm working on a local multiplayer game that uses multiple controllers (joysticks) on the same computer/console. I downloaded the InControl asset that should help with the input, but I can't find a way to detect which of the connected controllers was used to perform some action (i.e. on which controller was the button pressed). The application detects the actions properly, but it doesn't make any difference if joystick 1 or 2 "sent" the action. The only way I could accomplish this is to define specific axis (or more precisely, 20 axes for each controller) in Unity's input manager, but that seems too crude, and very unpractical to use within code. Is there another way to know which joystick performed the given action? Thanks
  4. Thanks, I'll try that. Now that I did some more research, I'm not 100% sure if the devices are actually on the same network, which might be the source of the problem. Thanks for the suggestion, It will be useful later on.
  5. Hey guys, As the title says, I'm trying to control a desktop game by using my mobile phone as a controller. I created two scenes, one that acts as a server, other as a client. Server has this code: void Start () { Test = "Nothing yet happened"; NetworkServer.Listen(25000); NetworkServer.RegisterHandler(888, ServerReceiveMessage); } private void ServerReceiveMessage(NetworkMessage message) { StringMessage msg = new StringMessage(); msg.value = message.ReadMessage<StringMessage>().value; if (!String.IsNullOrEmpty(msg.value)) { Test = "Message received"; string[] deltas = msg.value.Split('|'); Horizontal = Convert.ToSingle(deltas[0]); Vertical = Convert.ToSingle(deltas[1]); TestScript.MoveForward(Vertical); TestScript.RotateAroundY(Horizontal); } else { Test = "Nothing received"; } } And client this: private void Connect() { client.Connect(IPAddress, 25000); } void Start () { client = new NetworkClient(); Connect(); } void Update () { #if UNITY_ANDROID MobileTouches = Input.touches; if (MobileTouches.Length > 0) { for (int i = 0; i < MobileTouches.Length; i++) { if (MobileTouches[i].phase == TouchPhase.Moved) { Horizontal = MobileTouches[i].deltaPosition.x; Vertical = MobileTouches[i].deltaPosition.y; }else if(MobileTouches[i].phase == TouchPhase.Stationary) { Connect(); } } } #elif UNITY_EDITOR Horizontal = Input.GetAxis("Horizontal"); Vertical = Input.GetAxis("Vertical"); #endif thumb.Translate(Vector3.up * Vertical * Time.deltaTime); thumb.Translate(Vector3.right * Horizontal * Time.deltaTime); SendControllerInfo(); } static public void SendControllerInfo() { if (client.isConnected) { StringMessage msg = new StringMessage(); msg.value = Horizontal + "|" + Vertical; client.Send(888, msg); } } Ip address is hard coded, I just replaced it with the "IpAddress" variable. The code itself builds fine, and when I try to run in on a desktop computer, it works as expected (just a simple movement of an object on the server screen). However when I try to publish the client scene to a mobile device (Android), it doesn't connect to the server. They are both connected to the same network. Can anyone tell me what the problem might be? Thanks
  6. I'm using AddTorque to turn the car, and that function does not have a positional option (torque is applied around the provided axis). I'll try switching to AddForceAtPosition, and see what happens. This part is a bit tricky to explain - we would like the driving itself to be as realistic as possible (obviously, we are making a game, not a simulation, so some concessions will be made to speed the development up), however our vehicles have the ability to "fly" (not like airplanes, but they need unrealistic maneuvering capabilities when airborne), so the behavior of the vehicle differs when grounded and airborne. We have mechanism in place that determine if the car is grounded or not, but they are not perfect (for instance how to differentiate between the flight we want to control, and a simple bump on the road), so that causes some problems. I've tried switching from one "main" rigidbody to main+4 wheel rigidbodies, but it causes the vehicle to go crazy on every little bump (it gets too shaky, and very hard to stabilize, even with anti roll code implemented). The most obvious problem that I want to solve with this is the following scenario: - if the vehicle is close to the wall or any other type of fixed obstacle and I try to turn to the opposite side, the back of the car moves towards the wall and causes a collision that pushes the vehicle back to the wall. In reality, the front wheels would pull the car, without the back of the car going the opposite way Do you have any suggestion that might help me with that problem? Thanks for your input
  7. Hey guys, We are working on a project that revolves around driving different types of vehicles. We have already created a basic driving mechanism that works very well, but one of the problems we are having is that the vehicles are obviously rotating around their middle (or more precisely, around their center of mass) which doesn't look too realistic. Moving the center of mass towards the front of the vehicle gave a bit better result, but it makes the vehicles more unstable on frontal collisions and bouncing when encountering terrain unevenness. Our goal is to have the front wheels turn first and "pull" the rest of the car behind them. We are not using wheel colliders, rather one rigidbody (attached to the body of the car) to which we add forces and torque. The code itself is pretty simple, it calculates the turn vector with regards to car mass, user input and some other parameters that we added to each vehicle to differentiate them, and then add torque to the car rigidbody with regards to that vector. My question is, have you encountered this problem, and what would be your suggestion on solving it? Thanks
  8. Yeah, I know, that's why I'm trying to get information from various forums (including Microsoft's), just to be prepared before we go straight to Microsoft't or Unity's tech support. I know that people can't really talk about the specifics of the integration, I'm just trying to find out if Microsoft made some plug-in for Unity that would help us integrate it into our game.
  9. We downloaded XDK, and I supposed that Microsoft has some sort of a system in the XDK itself, just doing the research before we start integrating this option in our game. One interesting thing - when I googled "Voice chat for XBox" or "Unity voice chat for XBox" (and other variations of those searches), XBox Live voice chat didn't appear once on the first page of the search. I noticed that all examples and references to XDK's GameChat2 (the name of the voice service) are written in C++, does anyone know if there are any examples made in Unity with C#?
  10. Our primary concern (for reasons I'm not sure I can discuss, so let's just leave it at that) is XBox One, although the game is developed for PC/PlayStation 4/XBox One platforms. Regarding the 65$ price per seat - it is not out of our financial reach, but the problem is that there is no trial version (as far as I've seen), and I have no idea how Dissonance would work with our current network infrastructure, so if we pay 65$ just to see that we would have to overhaul a huge portion of the networking scripts, that would prove to be much more expensive than the price seems to be at first glance. Probably the biggest problem is that this is our first encounter with in game VOIP service, and we really don't know what to expect when implementing one, so I'm looking for as much input from people who delt with it before as I can get. Thank you for your reply.
  11. Hello We made a game using Unity 5.5.4p4 that contains a multiplayer component. For this purpose we used Photon Realtime engine (with PlayFab backend platform). We are interested in integrating a VOIP service so the players could chat in real time during the game. A quick look at the Asset Store gives me only 2 possible plug-ins: - Photon Voice - Dissonance The problem with Photon Voice, although at first it would seem as a natural choice, but it only supports PUN engine, not Realtime, and we don't know how much changes would be needed to integrate it with the current code. Dissonance is a bit costly, and I also can't find references to Photon Realtime (no idea if they would work together). What are your experiences with this problem, what would be your suggestions? Are there some other plugins that could be imported into Unity to solve this problem? Thanks
  12. PrintJam

    Screenshots from PrintJam gameplay
  13. [Android] PrintJam

    Hey guys, My team and I published our first game to the Google Play store (Beta was already up but available only for certain countries, the full version is available worldwide). Since this is our first project, we would really like to get feedback from other developers, just to get a fresh perspective on the entire thing.   The game can be downloaded for free:   https://play.google.com/store/apps/details?id=com.roundedsquarish.cmyk   [attachment=30420:paper boss concept 3.jpg] [attachment=30421:Screen03.jpg]
  14. Without any code it is hard to guess, but I would use this approach:   Perfect trap: - Extend the collider that you use to detect that the player is receiving the ball (just slightly, so that you have a few pixels of space between players legs and the edge of the collider). - When the ball collides with the collider, use Vector3.Lerp function to "smooth" the transition between the points in which the ball is moving and when it stops. - You can put that Lerp function in an if() block, and use conditions like player stats, speed of the ball etc. to determine if the first touch will succeed or if the ball will bounce away from the player.   Imperfect trap: - If you want it a bit more realistic, you could use two Lerp functions - one to regulate the transition from the edge of the collider to players feet (time right before the trap), and the other from his feet outside (time after the player tries to trap the ball). Depending on players skills, the second Lerp can regulate the speed, distance and direction in which the ball would go after the player tries to stop it (naturally, if the players stats are higher, the ball will fly a smaller distance, and stop closer to the player than if the stats are higher)     This is just an idea, hope it helps.
  15. PrintJam

    Hey guys,   My team and I have worked on a scroller/shoot-em-up game for a while now, and we are in a late Beta stage. The game is currently available only for Android users in UK, Croatia, Bosnia and Serbia. It is completely free, and we would like to hear some feedback from other devs. You can find it on Google play: https://play.google.com/store/apps/details?id=com.roundedsquarish.cmyk.    This is our first project, so any suggestion is very welcome. You can find more info on http://roundedsquarish.org/ Thanks.