So I’m trying to fake a little wind effect on an object who is suppose to dangle in the air by using AddForce, it is working however the problem is that it only start to simulate it when I drag the dangeling object in the Scene view…
The way I have put this up is that I have a hinge joint on my object connected with another gameobject.
EDIT:
Code:
using UnityEngine;
using System.Collections;
public class wind : MonoBehaviour {
public float forceMax;
public float forceMin;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
rigidbody2D.AddForce(new Vector2(Random.Range(forceMin, forceMax), 0));
}
}