How to click and drag to Mouse Orbit in Unity

In many cases we need an ability to do Mouse Orbit in our Unity Game. Mouse Orbit means by moving your mouse you are orbiting a specific object to view it in different angles.

I’ve found this script from this link:

By default, without clicking the screen you already orbiting your specific object. But I modified the script to only orbit by mouse click only, I mean if I don’t hold my left mouse button I don’t want to orbit.

Simple and easy PHP and Unity POST and GET http request tutorial

This tutorial is about simple and easy HTTP POST and GET request from Unity.

First, take a look this php program, you can test sending POST and GET request directly from web browser if you are running it on your localhost server.

Call JavaScript function from Unity and vice versa – Unity JavaScript Bridge

When building a Unity program for web (WebGL), mostly we need to access methods/functions inside Unity from JavaScript (browser scripting).

This example is showing how it can be done. In this example I’m showing how to call JavaScript alert from Unity and then send back some string text to Unity Scene from web browser.

How to set a texture of a Game Object from URL in Unity3D

I’ve searched for this thing recently on internet and I found a way to set a texture image from URL to a game object in Unity3d.

Here is the script, you can attach this script to your GameObject, but don’t worry to specify your desired URL on the inspector.

How to use PDFJS to open pdf file in full screen and embedded in Iframe

In this video I demonstrate how to use PDFJS to open a full screen pdf file in a web browser and also how to embed a pdf file in an Iframe.

By default PDFJS opens the pdf file from any url you specified in full screen. But we can use Iframe to open pdf file inside it if we don’t need to show it full screen.

Creating crowd cars that move along given waypoints in Unity3D

Sometimes we need to create some dummy crowd cars that move from a point to another points to fill up the scene with fake traffic system.

This script, which I call it WP Patrol is able to move any object, let’s say a car, to any specific points (way points).

But please note that this script is not a car controller script, it just a script that moves any object around waypoints.

Those waypoints are invisible cubes with certain tag that you can position them anywhere.

How to use Facebook Comments plugin dynamically in your PHP websites

This tutorial in this video showing you how to use Facebook Comments Plugin dynamically on each page of your website without adjusting it one by one on each page with the help of PHP.

How to prevent a camera from going inside any collision object in Unity3D

Sometimes when our camera moves, it goes inside an object like wall, tree or any other object. How to prevent that? This is very simple solution, you can try it wit a few mouse clicks.

The solution is to add a collider and rigid body components to the camera.

Watch this video to see how it works:

Another tutorial about Smooth Camera Follow in Unity

Hi, previously I’ve made a tutorial about how a camera can follow an object smoothly in Unity. That tutorial was in this link:

But seems some have problem, they said camera movement is shaky and laggy.

So, here is another tutorial, this time I exported my scene and script as a Unity package, so please download the package here and import it in your project.

Here is the video demonstration how I used the script inside the package:

Showing Previous and Next Tab Divs with JavaScript and jQuery

Here is another example and tutorial how we can do a show and hide previous and next HTML5 divs/tabs based on it’s id’s and classes…

The idea is simple, we must store a value of a number of current tab that we are seeing right now in a variable, then by clicking next button we show the next tab with that value+1, and if we click previous button we show the tab with that stored value-1, also with hiding the rest unnecessary tabs.