Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by UnityGamesRoland

  1. Disable the collision between the player and the carried object manually. https://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html
  2. I think this should have been one of the first things to create, all of the systems use player input in some way, so it is going to get more and more complicated to implement as time goes on. Also, you should tone down the bloom, it makes the screen very hectic.
  3. I'm sticking with the LTS version until they finally manage to get rendering pipelines and other core stuff out of "preview".
  4. @MyIsaak @bobboo101 Here it is https://jmp.sh/SK6L3Qp. I also compiled a quick overview of the project. Once you imported the package, check out the readme.txt
  5. @MyIsaak Thanks for the feedback, haven't tried benchmarking it. I'm not planning to work on it anymore to be honest, so I might share it later.
  6. You put the OnGUI() inside the TakeDamage() function. Doesn't visual studio cry about this?
  7. Network send rate is 20. A network packet consist of the following: Vehicle's next frame position based on the current velocity Vehicle's local forward and right vector for the rotation Per wheel steering angle, rpm, and height In total it is 108 byte/packet which isn't bad in my opinion, but it can easily be optimized a bit more.
  8. In the past few weeks I've been working on this small multiplayer project, where you can basically drive and drift around the scene with others. It has no point at all but hey, I can safely say that I finally managed to figure out networking! This is a customizable, semi-realistic vehicle controller, with lightweight networking on top of it. For networking I'm using Photon. By lightweight I mean that it doesn't sync everything (like transforms and rigidbodies), only the data that I actually care about.
  9. Hey, so I really want to create a horde system and figured ECS is the way to go. I spent an hour or two researching and learning, but I only found Unity's official tutorial on youtube and a post on Intel's Developer Zone. I'm looking for useful resources, and tips if you have any. I'll start working on the horde tomorrow, I'll probably do a bit of showcase if it works.
  10. They look pretty good. Are these hand made normals?
  11. Yeah nice, and what about the copyright issues?
  12. Go into the Curves tab of the Animation window and make adjustments there.
  13. Cache your WaitForSeconds() to reduce garbage collection. private var delay = new WaitForSeconds(2f); //Logs the time every 2 seconds. private IEnumerator MyCoroutine() { Debug.Log(Time.time); yield return delay; }
  14. StopCoroutine("CoroutineName") doesn't stop a coroutine on its own. You have to cache it and stop the cached routine. Otherwise you'll just create a copy of the named routine and stop that one. private Coroutine myRoutine; //Start a coroutine and cache it. myRoutine = StartCoroutine("YourCoroutineName"); //Stops the cached coroutine. StopCoroutine(myRoutine);
  15. Looks pretty cool. I really like the UI as well. My main issue when I started working on top-down shooters was the animation solving. So if anyone is having the same issue, here you go: Of course this system only works if you have a 2D blend tree set up for the movement animations. You also have to have 2 float parameters named "Horizontal" and "Vertical" for the blend tree. //Animate the character's movement to match the given direction. public static void AnimateCharacterMovement(Animator animator, Vector2 direction) { Vector3 moveDirection = Vector3.forward * direction.y + Vector3.right * direction.x; Vector3 animDirection = animator.transform.InverseTransformDirection(moveDirection.normalized); animator.SetFloat("Horizontal", animDirection.x, 0.06f, Time.deltaTime); animator.SetFloat("Vertical", animDirection.z, 0.06f, Time.deltaTime); } //These should obviously be cached in some way (animator in start or awake, inputDirection is in update). Animator animator = GetComponent<Animator>(); Vector2 inputDirection = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")).normalized; //Calling the static function. YourClassName.AnimateCharacterMovement(animator, inputDirection);
  16. Game references for fans and game creators alike. https://gameswat.ch/
  17. Can you show us the wireframe of the models?
  18. Now this is how you can get people to help you. These mock-ups are really good for a general understanding of the project(s) and it also shows that you will be useful for the team as well. Unfortunately I don't have time for smaller projects, but I'm certain that you will find people who are happy to help realizing these games. Make a post on the unity forums if you haven't already (and make sure to include the mock-ups). Best of luck!
  19. Change Anisotropic Textures and Texture Quality (both inside Quality Settings window) for better results.
  20. @OcularCash I've tried moving things around but it still worked. Anyways I'll stick to using Awake() and Start() as I said before just to make sure. Are there any benefits of caching the singleton instance of a class though? Would this make a difference in performance? //This would be assigned in Start() but I'm lazy to type that much lol public InputManager input = InputManager.Instance; void Update() { //InputManager's instance is not cached. Debug.Log(InputManager.Instance.debugString); //Using the cached InputManager singleton instance. Debug.Log(input.debugString); }
  21. For my manager scripts (such as MenuManager, GameManager, etc...) I always use the singleton pattern. Recently I looked into generics and came up with this code: using UnityEngine; using System.Linq; public abstract class SingletonBehaviour<T> : MonoBehaviour where T : MonoBehaviour { public static T Instance { get; private set; } private void Awake() { //Creates a singleton for the class that derived this class. CreateSingleton(); } protected void CreateSingleton() { //If an instance is already assigned, destroy the current class. if (Instance != null) DestroyImmediate(this); //The class doesn't have an instance yet, so we can safely assign the first available. else Instance = Resources.FindObjectsOfTypeAll<T>().FirstOrDefault(); } } As you can see, the CreateSingleton() method is called in Awake(). I've done some tests and it turns out that I can access the Instance in an Awake() without any errors. Like this: //This class derives SingletonBehaviour, which sets up the Instance variable of this class in Awake(). public class InputManager : SingletonBehaviour<InputManager> { public string debugString = "It works! Wohoo!"; } //Test class which accesses the Instance of the InputManager, also in Awake(). public class Test : MonoBehaviour { private void Awake() { Debug.Log(InputManager.Instance.debugString); } } Is there a chance that the Test script would try to access InputManager.Instance before it is assigned? I'm suprised that there were no errors, I always used Awake() for assigning and Start() for accessing members.
  22. Make sure that the audio source's (that is playing the sound) Spatial Blend is 3D and not 2D.
  23. Replace: if (Input.GetAxis("Vertical") > 0.2f && Playercontroller.isGrounded) { ... } With: if (Playercontroller.velocity.magnitude > 0.2f && Playercontroller.isGrounded) { ... }
  • Create New...