Hi people!
Created with the help of a rope hinge joint2d, I made a character , made a movement of the character ,
How to make a character caught in the rope ?
![alt text][1]
[1]: /storage/temp/78424-file.jpg
On the character movement is the script:
using UnityEngine;
using System.Collections;
public class Touch_Tors : MonoBehaviour {
public GameObject tors;
public GameObject player;
public int addforce=500;
public float speed;
private Rigidbody2D rb;
void Start () {
rb = GetComponent();
}
void Update () {
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
float moveVerticalZ = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, moveVerticalZ, moveVertical);
rb.AddForce (movement * speed);
}
}
How to make a character grabbed or hooked a rope??? Please Help!
↧