Thursday, 21 December 2017

Unity 3d First Person Shooter (FPS) - Hindi/Urdu [02]





Unity 3d First Person Shooter FPS - Hindi Urdu for beginners.
https://www.unity3d.com
https://www.udemy.com
Do you want to know how to make an FPS in Unity? Making a shooter in Unity is easy for beginners. Using Unity.
everything will be as simple as possible.
First Person Shooter elements: WSAD-Movement Looking around with the Mouse; A decent looking weapon further we will create enemy AI and weapon switching if possible stay tuned .

like and subscribe if you liked the video and share it.

Script download
-- http://urdutechtutorials.blogspot.com/2017/12/unity3d-fps- shooter-script-c.html

Unity3d FPS Shooter Script c#

  WATCH COMPLETE VIDEO TUTORIAL ON YOUTUBE CHANNEL HERE

using UnityEngine;
using System.Collections;

public class RaycastShootComplete : MonoBehaviour {

    public int gunDamage = 1;                                           // Set the number of hitpoints that this gun will take away from shot objects with a health script
    public float fireRate = 0.25f;                                      // Number in seconds which controls how often the player can fire
    public float weaponRange = 50f;                                     // Distance in Unity units over which the player can fire
    public float hitForce = 100f;                                       // Amount of force which will be added to objects with a rigidbody shot by the player
    public Transform gunEnd;                                            // Holds a reference to the gun end object, marking the muzzle location of the gun
    public GameObject Particle;

    private Camera fpsCam;                                              // Holds a reference to the first person camera
    private WaitForSeconds shotDuration = new WaitForSeconds(0.07f);    // WaitForSeconds object used by our ShotEffect coroutine, determines time laser line will remain visible
    private AudioSource gunAudio;                                       // Reference to the audio source which will play our shooting sound effect
    private LineRenderer laserLine;                                     // Reference to the LineRenderer component which will display our laserline
    private float nextFire;                                             // Float to store the time the player will be allowed to fire again, after firing


    void Start () 
    {
        // Get and store a reference to our LineRenderer component
        laserLine = GetComponent<LineRenderer>();

        // Get and store a reference to our AudioSource component
        gunAudio = GetComponent<AudioSource>();

        // Get and store a reference to our Camera by searching this GameObject and its parents
        fpsCam = GetComponentInParent<Camera>();
    }


    void Update () 
    {
        //Input.GetKey("Fire1")
        // Check if the player has pressed the fire button and if enough time has elapsed since they last fired
        if ( Input.GetButtonDown("Fire1")&& Time.time > nextFire) 
        {//Input.GetButtonDown("Fire1")&& Time.time > nextFire
            // Update the time when our player can fire next
            nextFire = Time.time + fireRate;

            // Start our ShotEffect coroutine to turn our laser line on and off
            StartCoroutine (ShotEffect());

            // Create a vector at the center of our camera's viewport
            Vector3 rayOrigin = fpsCam.ViewportToWorldPoint (new Vector3(0.5f, 0.5f, 0.0f));

            // Declare a raycast hit to store information about what our raycast has hit
            RaycastHit hit;

            // Set the start position for our visual effect for our laser to the position of gunEnd
            laserLine.SetPosition (0, gunEnd.position);

            // Check if our raycast has hit anything
            if (Physics.Raycast (rayOrigin, fpsCam.transform.forward, out hit, weaponRange))
            {
                // Set the end position for our laser line 
                laserLine.SetPosition (1, hit.point);

                // Check if the object we hit has a rigidbody attached
                if (hit.rigidbody != null)
                {
                    // Add force to the rigidbody we hit, in the direction from which it was hit
                    hit.rigidbody.AddForce (-hit.normal * hitForce);
                }
            }
            else
            {
                // If we did not hit anything, set the end of the line to a position directly in front of the camera at the distance of weaponRange
                laserLine.SetPosition (1, rayOrigin + (fpsCam.transform.forward * weaponRange));
            }
        }
    }


    private IEnumerator ShotEffect()
    {
//        Gun.getInstance.PlayAnim ();

        this.gameObject.GetComponentInParent<Rigidbody>() .AddForce (new Vector3 (-50f, 0, 0), ForceMode.Impulse);
        GameObject particle = Instantiate (Particle, gunEnd.transform.position, Particle.transform.rotation);
        Destroy (particle, 0.5f);
        // Play the shooting sound effect
        gunAudio.Play ();

        // Turn on our line renderer
        laserLine.enabled = true;

        //Wait for .07 seconds
        yield return shotDuration;

        // Deactivate our line renderer after waiting
        laserLine.enabled = false;
    }
}

Tuesday, 19 December 2017

Unity3d First Person Shooter Tutorial ( Hindi / Urdu) [01]



Complete tutorial on how to create or make a fps (first person shooter) game in unity in hindi urdu.

In this Tutorial we will learn how to make a First Person Shooter (FPS) game in Unity. As usual, everything will be as simple as possible. We will focus on the following First Person Shooter elements: W SAD-Movement & Jumping; Looking around with the Mouse; A decent looking weapon further we will create enemy AI and weapon switching f possible stay tuned .

https://www.unity3d.com
https:www.turbosquid.com

Sunday, 26 November 2017

Unity3D - Animated Monster Character on Assetstore

How to Become A GameDeveloper (Hindi / Urdu)



a career in video games - Game development is fastest growing and Hottest Field in 2017 in this video we will talk about how to become a professional game developer and why you need to learn game development, also how to earn money by developing a game and upload it in google play store. how much coding skills arr required to become a professional game developer.

Saturday, 11 November 2017

Unity3D Create Tapping Game [Hindi / Urdu] 01





https://www.youtube.com/channel/UCOGA5JnlIF7spbyEDAkFG-g/playlists?view_as=subscriber

Sunday, 5 November 2017

Unity 3D Basics - C# Ternary Operators (shorthand if - else) [18]



click here

https://www.youtube.com/channel/UCOGA5JnlIF7spbyEDAkFG-g/videos?view_as=subscriber

Unity 3d -what are Properties ? (hindi/urdu) [17]



In this Video tutorial series we are going to learn 
about the basics of unity scripting.
we will cover the basic concepts of unity scripting
 and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and
 debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Friday, 3 November 2017

Unity3d - enum or enumerations in c# [16]



In this Video tutorial series we are going to learn 
about the basics of unity scripting.
we will cover the basic concepts of unity scripting
 and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and
 debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Invoke Function in Unity c# (to call method over certain time) [15]



In this Video tutorial series we are going to learn about the basics of 
unity scripting.
we will cover the basic concepts of unity scripting and do a practical
work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Thursday, 2 November 2017

Unity Basics (Mouse Events) [12]




In this Video tutorial series we are going to learn about the basics of unity scripting.
we will cover the basic concepts of unity scripting and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Wednesday, 1 November 2017

Unity3d Destroy GameObjects At Runtime [10]




In this Video tutorial series we are going to learn about the basics of unity scripting.
we will cover the basic concepts of unity scripting and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Tuesday, 31 October 2017

Unity Basics ( Rotate and Translate function ) [07]



In this Video tutorial series we are going to learn about the basics of unity scripting.
we will cover the basic concepts of unity scripting and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Unity3d Vectors Explained (Vector3 and Vector2) [05]



In this Video tutorial series we are going to learn about the basics of unity scripting.
we will cover the basic concepts of unity scripting and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Unity 3d Basics( Update and fixedUpdate difference) [04]




In this Video tutorial series we are going to learn about the basics of unity scripting.
we will cover the basic concepts of unity scripting and do a practical work.
Watch this whole series carefully and .
After this course you will be able to develop and debug code easily.
................................
Watch All video in A Sequence
https://www.youtube.com/playlist?list=PLgAF6rpCsTCiZpCCXMdnErw2VcCOFYSQv
................................

Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Saturday, 28 October 2017

Unity Car Game Tutorial - Android Input Button For Race and Brake




#Unity #car #racing #hill #climb #2d

Welcome In This series we are going to 
develop 2D car game in unity .
it is a Physics Based 2d racing puzzle just like
hill climb racing.

we will learn about "wheel joint 2d" and jointMotor in detail.
.........................................
         Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Unity Car Game - Smooth Camera Follow [02]



#Unity #car #racing #hill #climb #2d

Welcome In This series we are going to 
develop 2D car game in unity .
it is a Physics Based 2d racing puzzle just like
hill climb racing.

we will learn about "wheel joint 2d" and jointMotor in detail.
.........................................
         Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Wednesday, 25 October 2017

Unity 2D Racing Car Game in Hindi / Urdu [01]



#Unity #car #racing #hill #climb #2d

Welcome In This series we are going to 
develop 2D car game in unity .
it is a Physics Based 2d racing puzzle just like
hill climb racing.

we will learn about "wheel joint 2d" and jointMotor in detail.
.........................................
         Other Courses :

(1) Endless Runner in Unity3D
 https://youtu.be/UA7xY_7sOGw
.........................................
(2) 2D Runner Game complete
 https://youtu.be/PNjTkNHKfrU
.........................................
(3) FYP PROJECTS
 https://youtu.be/k43qmEbHQuw
.........................................

Monday, 23 October 2017

Unity2D- Turning Player Left And Right



Unity 2D Player Character Controller 
(Creating Animations From Sprites) .

In This Tutorial We will Setup 2D character 
from scratch we will :
(1) Create Animations From Sprites.
(2)Finite state machine setup.
(3)study parameter in FSM.
(4)scripting FSM changing Animations.
(5)scripting basic character movements (run,jump etc.)
Tags:
Unity, 2d, player, character, controller, moving, sprites, animation, sprite sheet, 2d animation, game, 2d player, running, walking, hindi, urdu, fast solution,

Sunday, 22 October 2017

Unity 2D player Movement - Running and Turning (with Animations) [04]



#unity #simple #player #movement #walking #running #turning
Unity 2D player Movement - Running and Turning 
Making player transition between different animations as the player runs and move and turn left and right.

               S U B S C R I B E
============================
watch all videos in sequence
https://youtu.be/E5lsbDP2BFM
=============================

Unity 2D Player Character Controller (Creating Animations From Sprites) .

In This Tutorial We will Setup 2D character from scratch we will
(1) Create Animations From Sprites.
(2)Finite state machine setup.
(3)study parameter in FSM.
(4)scripting FSM changing Animations.
(5)scripting basic character movements (run,jump etc.)

Saturday, 21 October 2017

Unity 2D Character Controller (Scripting) 03






Unity 2D Player Character Controller (Creating Animations From Sprites) .

In This Tutorial We will Setup 2D character from scratch we will
(1) Create Animations From Sprites.
(2)Finite state machine setup.
(3)study parameter in FSM.
(4)scripting FSM changing Animations.
(5)scripting basic character movements (run,jump etc.)
Tags:
Unity, 2d, player, character, controller, moving, sprites, animation, sprite sheet, 2d animation, game, 2d player, running, walking, hindi, urdu, fast solution,

Friday, 20 October 2017

UNITY AdMob Problem Fixed Ads Not Showing ☑

Unity AdMob (Google Mobile Ads) Integration 2017

Unity AdMob (Google Mobile Ads ) Unity Plugin Integration


---- Watch Video Tutorials ----
Admob Integration Tutorial :
https://youtu.be/8wGXcEOYOig
-------------------------------
How To Fix AdMob Problem
https://youtu.be/JRGd7UG-WdE
------------------------------

using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;
using System;
 
public class AdManager : MonoBehaviour
{
 
    //THE SCRIPT HAS ORIGNAL ID'S OF ADMOB
    InterstitialAd interstitial;
    BannerView bannerView;
    // Use this for initialization
    void Start()
    {
 
        RequestBanner();
        RequestInterstitial();
    }
 
 
    public void RequestBanner()
    {
   // replace this id with your orignal admob id for banner ad
        string adUnitId = "ca-app-pub-3940256099942544/6300978111";
 
        // Create a 320x50 banner at the top of the screen.
        bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the banner with the request.
        bannerView.LoadAd(request);
        bannerView.OnAdLoaded += HandleOnAdLoaded;
 
    }
 
    void HandleOnAdLoaded(object a, EventArgs args)
    {
        print("loaded");
        bannerView.Show();
    }
 
 
    public void RequestInterstitial()
    {
 
        string adUnitId = "your interstial ad id here";
 
 
        // Initialize an InterstitialAd.
        interstitial = new InterstitialAd(adUnitId);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the interstitial with the request.
        interstitial.LoadAd(request);
 
 
    }
 
    public void show()
    {
        if (interstitial.IsLoaded())
        {
            interstitial.Show();
        }
    }
 
 
}

what are Layers In Unity

Unity 2d Animation From Sprite sheet ( Hindi / Urdu )

Thursday, 19 October 2017

Unity 2D Player Character Controller ( Finite state machine ) [02]



Unity 2D Player Character Controller (Creating Animations From Sprites) .

In This Tutorial We will Setup 2D character from scratch we will
(1) Create Animations From Sprites.
(2)Finite state machine setup.
(3)study parameter in FSM.
(4)scripting FSM changing Animations.
(5)scripting basic character movements (run,jump etc.)

Unity 2D Player Character Controller (Creating Animations From Sprites) ...




Unity 2D Player Character Controller (Creating Animations From Sprites) .

In This Tutorial We will Setup 2D character from scratch we will
(1) Create Animations From Sprites.
(2)Finite state machine setup.
(3)study parameter in FSM.
(4)scripting FSM changing Animations.
(5)scripting basic character movements (run,jump etc.)

Wednesday, 18 October 2017

Unity Change Material,shader And Texture at Runtime (Hindi /Urdu)






#Unity #shader #color #material #albedo #3d #2d
Change Obeject material and color at runtime also you can change shader.

https://docs.unity3d.com/ScriptReference/Material-ctor.html

Monday, 16 October 2017

Unity 2D Infinite Background Scrolling [ Simple Way ]






Visit youTube channel for more Awesome videos..

https://www.youtube.com/channel/UCOGA5JnlIF7spbyEDAkFG-g



download code here..

http://urdutechtutorials.blogspot.com/2017/10/unity-2d-infinite-background-scrolling.html

Unity 2D Infinite Background Scrolling Simplest Way

Watch Video Tutorial
Code for Infinite Background Scrolling IN Unity 2d game.

using UnityEngine;
using System.Collections;
 
public class Scroll : MonoBehaviour
{
 
    public float backGroundSize;
 
    private Transform cameraTransform;
    public Transform[] layers;
 
    private float viewZone = 0;
    private int leftIndex;
    private int rightIndex;
 
    private void Start()
    {
        cameraTransform = Camera.main.transform;   
 
        leftIndex = 0;
        rightIndex = layers.Length - 1;
    }
 
    void Update()
    {
        if (cameraTransform.position.< 
            (layers[leftIndex].transform.position.+ viewZone))
            ScrollLeft();
 
        if (cameraTransform.position.> 
            (layers[rightIndex].transform.position.- viewZone))
            ScrollRight();
    }
 
    private void ScrollLeft()
    {    
        layers[rightIndex].position = new 
           Vector3
           (1f * (layers[leftIndex].position.- backGroundSize), 0f0f);
        leftIndex = rightIndex;
        rightIndex--;
        if (rightIndex < 0)
            rightIndex = layers.Length - 1;
    }
    private void ScrollRight()
    {   
        layers[leftIndex].position = 
            new Vector3
            (1f * (layers[leftIndex].position.+ backGroundSize), 0f10f);
        rightIndex = leftIndex;
        leftIndex++;
        if (leftIndex == layers.Length)
            leftIndex = 0;
    }
}

Sunday, 15 October 2017

player Jump In Unity (Jump like MARIO) realistic jump





download Code

The Best Way to jump in Unity3d

Attach these two scripts with your player  and feel the difference in jumping it works both for 3D and 2D for 2D you have to make some adjustments in betterJump script.

WATCH VIDEO TUTORIAL

Player Script:


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour {
    public float speed = 10.0F;
    public float rotationSpeed = 100.0F;
    // Use this for initialization
    void Start () {
  
 }
 
 // Update is called once per frame
 void Update () {
 
        float translation = Input.GetAxis("Vertical"* speed;
        float rotation = Input.GetAxis("Horizontal"* rotationSpeed;
 
        translation *= Time.deltaTime;
        rotation *= Time.deltaTime;
 
        transform.Translate(00, translation);
        transform.Rotate(0, rotation, 0);
 
        if (Input.GetKeyDown(KeyCode.Space))
        {
            jump();
        }
    }
    void jump()
    {
        transform.GetComponent<Rigidbody>().AddForce(new Vector3(0190 * Time.deltaTime, 0),ForceMode.Impulse);
    }
}



Better Jump Script (for 3D project)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class fastJump : MonoBehaviour {
 
    public float fallMultiplier = 2.5f;
    public float lowJumpMultiplier = 2f;
    Rigidbody rb;
 
 
    void Awake()
    {
        rb = GetComponent<Rigidbody>();
    }
    void Update()
    {
        if (rb.velocity.< 0)
        {
            rb.velocity += Vector3.up * Physics.gravity.* (fallMultiplier - 1)
 * Time.deltaTime;
        }
    }
}

Better Jump Script (for 2D project)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class fastJump : MonoBehaviour {
    public float fallMultiplier = 2.5f;
    public float lowJumpMultiplier = 2f;
    Rigidbody2D rb;
    void Awake()
    {
        rb = GetComponent<Rigidbody2D>();
    }
    void Update()
    {
        if (rb.velocity.< 0)
        {
            rb.velocity += Vector2.up * Physics2D.gravity.*
                (fallMultiplier - 1* Time.deltaTime;
        }
    }
 
 
}