Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    32
  • comments
    4
  • views
    3018


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By mtjscott
      Hey, so i've created a disk in unity (2D mobile) that will be shot forward if you drag it back and the further you drag it from the start point the more force will be applied to the impulse similar to the 8ball pool drag to shoot mechanic on miniclip. However, when I applied a script that allows the main camera to follow the ball it broke the mechanic since the balls position is calculated through the camera in world space. So I created a bool that locks the camera in place until the ball is released so the calculation would happen before the camera starts to move. This works however the ball now rubber bands back and forwards close to the start position.
       
      If anything needs more explaining then i'd be glad to do so. I've only been coding for about a week so you'll have to bare with me. Any help is appreciated. Thank you very much.
       
      Here's What happens:
      https://gyazo.com/f211e50f32ac59437a93dad7295a14be
      (screencap gif of the game viewer)
       
      Here is the shoot script:
      using System.Collections; using System.Collections.Generic; using UnityEngine; public class Shoot : MonoBehaviour { [SerializeField] GameObject Disc; [SerializeField] float multiplier; Vector3 initPos; private Rigidbody2D rb; public static bool ballIsReleased = false; bool recordingDistanceDragged = false; private void Start() { rb = gameObject.GetComponent<Rigidbody2D>(); initPos = transform.position; } void OnMouseDrag() { recordingDistanceDragged = true; if(recordingDistanceDragged == true) { transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10)); } else { transform.position = initPos; } } void OnMouseUp() { ballIsReleased = true; } private void FixedUpdate() { if(ballIsReleased == true) { rb.AddForce((initPos - transform.position) * multiplier, ForceMode2D.Impulse); Debug.Log("ball is released"); recordingDistanceDragged = false; } else { ballIsReleased = false; } } }  
      Here is the camera follow script:
      using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraFollow : MonoBehaviour { private Vector2 velocity; public float smoothTimeY; public float smoothTimeX; public GameObject player; private void Start() { player = GameObject.FindGameObjectWithTag("Player"); } private void FixedUpdate() { if (Shoot.ballIsReleased == true) { Debug.Log("camera can move"); float posX = Mathf.SmoothDamp(transform.position.x, player.transform.position.x, ref velocity.x, smoothTimeX); float posY = Mathf.SmoothDamp(transform.position.y, player.transform.position.y, ref velocity.y, smoothTimeY); transform.position = new Vector3(posX, posY, transform.position.z); } } }  
    • By tspartant
      Hey everyone! My name is Ryan and I am the founder of Visualistic Studios, LLC. 
      I'm looking for experienced developers interested in short term and long term contracting. For the past 3 years I've been working in game development contracting, and the past year I've been working full time from home. Since then, I've received more and more contracts and I'm now at the point that I have too many for myself to handle. I have at least another full time job's worth of programming offers, and around 30-80 hours a month for 3D modeling/animation.  I have contracts using Unity as well as Unreal Engine 4, so if you can program in either please contact me. 
      If you are interested in working on these contracts, please send me links to your work and you hourly rate. (Most contracts range be between 18-25$/h, but please provide your normal hourly rate)
      You can get ahold of me through email - "ryan.hobbs@visualisticstudios.com", or Discord "TSpartanT#4670"
       
      Thank you everyone for reading, hope to hear from you soon!
    • By sosnol_gaming
      The massively popular memes "Bongo Cat" has been made into a smartphone game!
       
      Welcome to Bongo Cat DUELS! Wild West is waiting for you. Fight vicious enemies, upgrade cat skills and buy new guns.
       
      FEATURES:
       
      -Participate in duels;

      -Get money and experience for winning;
       
      -Open new duels;

      Google Play:
      https://play.google.com/store/apps/details?id=com.IceSky.bongo_cat_duels
      Youtube:
       
    • By Tanzan
      Hello  all,
      I just finished my first Android game and published it on Google play...
      I know its not the next red dead redemption2 but it would be nice to have some comments/feedback on it if its worth it to go on with a release 2.0. or move on to the next game? (red dead redemption 3  )
      Anyway thx for your reading time and i hope on some nice reviews!
      https://play.google.com/store/apps/details?id=com.gamlex.android.games.typomania
      Regards,
       
      Tanzan
       
       
    • By Dimitri Lozovoy
      The mobile editor for Voxyc, a voxel-focused open-source game engine in development, can now edit 3D scenes on Android. Right in the app, you can create voxel chunks and combine them with models and sprites. You can import files right from the menu and then assign textures, move and resize them with a few button presses. All imported objects can be animated with Lua scripts. The resulting scenes can be used in games created with Voxyc, but since the project is open-source, export to other formats and engines can be and are expected to be developed.
      The app is one of the first that allows level creation on the go. You can work wherever inspiration strikes. Any dull moment can now be used productively, which is important for small indie teams that lack resources or work after-hours or on weekends. Using your device's camera to make textures and inserting them right into the scene is also convenient. The app is aimed at people who work on games independently and, perhaps after having already spent hours at their desk job, do not wish to be tied down to a chair and monitor. I find that using the app on a tablet is most convenient.
      Although the engine and the editor have come a long way in the last year, at this time, I am the only developer on the project. The editor and the engine are still missing some essential features, and I am looking for developers with whom I can share code. The codebase is cross-platform C++ and target platforms are Android, iOS, Windows, Mac, OpenVR, GearVR, Daydream and others.
      Voxyc editor for Android on Google Play
      Engine source code on GitHub
      Gamedev project link

      View full story
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!