02-05-2020, 12:04 PM
Hello.
I want help about cloning a rope in runtime. I have a rope attached to player's hand. I need to clone it exactly with old one, with positions of particles i meant. Old one will be stay in game for 5-6 seconds, new one will be new rope of the hand. And old rope vs new rope shouldn't collide so I have made layer matrix settings. I have used saving state and load immediately, but there are also some obstacles in map, rope may go through the walls, I am really stucked.
Result : https://streamable.com/digvso
Save/Load script :
Thank you.
I want help about cloning a rope in runtime. I have a rope attached to player's hand. I need to clone it exactly with old one, with positions of particles i meant. Old one will be stay in game for 5-6 seconds, new one will be new rope of the hand. And old rope vs new rope shouldn't collide so I have made layer matrix settings. I have used saving state and load immediately, but there are also some obstacles in map, rope may go through the walls, I am really stucked.
Result : https://streamable.com/digvso
Save/Load script :
Code:
public ObiActorBlueprint Save()
{
ObiActorBlueprint state2 = Instantiate(rope.blueprint);
rope.SaveStateToBlueprint(state2);
return state2;
}
public void Load(ObiActorBlueprint state3)
{
rope.ropeBlueprint = (ObiRopeBlueprint)state3;
}
Thank you.