How to Move Make Objects by Adding Force in Unity

There are two methods to make object move in unity:
1. By changing its Transform (Position).
2. By adding Force by using AddForce() method.

download
In this blog I have mentioned, how we can make object move by adding force.
Force and Velocity both are component of Physics. So, to make our gameobject come under influence of Physics we must attach a rigid body to it and then we can code it to move by adding force in different direction.
Below is the script for your reference.

using UnityEngine;
using System.Collections;
public class BallScript : MonoBehaviour
{
void Update ()
{
if (Input.GetKey (KeyCode.UpArrow))
{……….
See more at:How to Move Make Objects by Adding Force in Unity

You can check more informative blogs and tutorials at android development blogs section and can also browse the android developer forum for posting and viewing latest questions on android development.

Advertisements
How to Move Make Objects by Adding Force in Unity

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s