Animation

Hi,

I’m starting to work with a project, where…

  1. character running on a rope,and that rope is curve in shape and ,sometimes character (bug) is coming outside the rope,
    not follow that path of rope ???

ropes in the game that stretch under the character’s weight???

Here , character is a Rigid body and main camera is attached to this character.

  1. Here i have rope FBX model and simply i move rope( electric poll rope)…
    this poll moving continuously ,

code…

using UnityEngine;
using System.Collections;

public class MoveScenes : MonoBehaviour {

Vector3 tempPos;
public GameObject prefab;
private Vector3 position = new Vector3 (0,0,0);
void Start ()
{

}

// Update is called once per frame
void Update ()
{

tempPos = transform.position;
tempPos.z -= Time.deltaTime;

if(tempPos.z < -34.0f)
{
tempPos.z = tempPos.z + 66.0f;
}
transform.position = tempPos;

}
}

Hi, welcome to the forum!

I’m not really sure what you are asking here. Are you saying you want tightropes in the game that stretch under the character’s weight? If not, can you give a bit more detail about what you want to do in your game.

character running on a rope,and that rope is curve in shape and ,sometimes character (bug) is coming outside the rope,
not follow that path of rope ???

ropes in the game that stretch under the character’s weight???

Here , character is a Rigid body and main camera is attached to this character…

Is the bug moving through the rope as if it wasn’t there? Can you post the code you are using for this?

for move rope i am using :

code:-

using UnityEngine;
using System.Collections;

public class MoveScenes : MonoBehaviour {

Vector3 tempPos;
public GameObject prefab;
private Vector3 position = new Vector3 (0,0,0);
void Start ()
{

}

// Update is called once per frame
void Update ()
{

tempPos = transform.position;
tempPos.z -= Time.deltaTime;

if(tempPos.z < -34.0f)
{
tempPos.z = tempPos.z + 66.0f;
}
transform.position = tempPos;

}
}

I have simply place that bug on that rope at the begining ,when scene is move in Z axis ,bug running (run animation) on that particular on that position,this seems bug is also cover the distance according to move scene and camera is fixed on that bug only.