#Ragdoll at first instantiate
1 messages · Page 1 of 1 (latest)
Too little data to tell
Is there code that may change the parent or position?
Can you show how its set up in the hierarchy?
Cool game btw
yes, ofcourse
here are the codes
here is the main thing to switch between agent and ragdoll
[SerializeField] List<Rigidbody> RigidList = new List<Rigidbody>();
public enum RagDollMode {Off, On, OnWithKNock} RagDollMode ragDollMode = RagDollMode.Off;
public void Bridge_AgentToRagdoll(RagDollMode NewMode){
ragDollMode = NewMode;
MoveInterface.Set_Animation(ragDollMode == RagDollMode.Off, data.Get_MoveSpeed());
Agent_Enable(ragDollMode == RagDollMode.Off);
RagDoll_SetActive(ragDollMode != RagDollMode.Off);
}
the "MoveInterface"
public void Set_Animation(bool Enable, float MoveSpeed){
EAnimator.enabled = Enable;
EAnimator.SetFloat("Move Speed", MoveSpeed / MoveAnimateSpeed);
}
the "agent_Enable()" function:
public void Agent_Enable(bool IsOn){
MainHitBox.enabled = IsOn;
if (Agent != null) Agent.enabled = IsOn; }
the "RagDoll_SetActive()" function:
public void RagDoll_SetActive(bool IsOn){ foreach(Rigidbody target in RigidList){ target.isKinematic = !IsOn; target.detectCollisions = IsOn; } }
and somehow when I switch from agent to ragdoll the guy just do some sudden jiggle (like in the video)