Hi Justin,The grenade is thrown when the use animation event is sent: https://opsive.com/support/document...controller/animation/animation-event-trigger/
This video gives details on how the grenade is setup:
Hi Justin,The grenade is thrown when the use animation event is sent: https://opsive.com/support/document...controller/animation/animation-event-trigger/
This video gives details on how the grenade is setup:
Hi, I have noticed that this problem is still unresolved. Is there a quick workaround?Hi wuyan, you're absolutely right, I just checked in the demo scene. When any ThrowableItem gets thrown, its transform parent gets changed from the rig to null, which is where the issue seems to occur. I'll let Justin know about this to see if there's a quick workaround.
var collisionEnabled = m_CharacterLocomotion.CollisionLayerEnabled;// NEW
m_CharacterLocomotion.EnableColliderCollisionLayer(false);// NEW
if (!m_CharacterLocomotion.ActiveMovementType.UseIndependentLook(false) &&
Physics.Linecast(m_CharacterLocomotion.LookSource.LookPosition(), m_InstantiatedTrajectoryObject.transform.position, out m_RaycastHit,
m_ImpactLayers, QueryTriggerInteraction.Ignore)) {
m_InstantiatedTrajectoryObject.transform.position = m_RaycastHit.point;
}
m_CharacterLocomotion.EnableColliderCollisionLayer(collisionEnabled); // NEW
I took a closer look at it and figured out the cause. When the character throws the item a raycast is performed to ensure the weapon doesn't spawn behind a wall. This raycast was hitting the character when the character should have been ignored. I will have this fixed in the next update but you'll want to add the following with the NEW comment within ThrowableItem.ThrowItem: