aymn
Junior vMember
Posts: 38
|
Post by aymn on Sept 11, 2019 15:16:59 GMT
Hi everyone .. why my AI Bullets life not working its penetrate every Thing even if the layer and tag of the game object is set to ricochet
|
|
|
Post by Invector on Sept 11, 2019 15:23:57 GMT
Did you set the DamageLayer in the ShooterManager?
|
|
aymn
Junior vMember
Posts: 38
|
Post by aymn on Sept 11, 2019 16:13:21 GMT
Did you set the DamageLayer in the ShooterManager? yes i set it in the ShooterManager it draw the decal but it still penetrate the Objects in the scene
|
|
|
Post by Invector on Sept 11, 2019 18:04:09 GMT
Do you have the Shooter Template as well? he have a demo scene there with a few walls demonstrating what is penetrable or not, that reminds me to add one to the FSM template as well.
|
|
aymn
Junior vMember
Posts: 38
|
Post by aymn on Sept 12, 2019 12:15:09 GMT
Do you have the Shooter Template as well? he have a demo scene there with a few walls demonstrating what is penetrable or not, that reminds me to add one to the FSM template as well. i fix it by making script have destroy function and call this function by raycasthit Event ... i have another question ... i make script to change FSM state on trigger enter and exit : using System.Collections; using System.Collections.Generic; using UnityEngine; using PixelCrushers; namespace Invector.vCharacterController.AI.FSMBehaviour { public class OnTriggerChangeFSMState : TagMaskEvent { public vFSMState VFSMStateEnter; public vFSMState VFSMStateExit; private void OnTriggerEnter(Collider other) { if (!IsInTagMask(other.tag)) return; { other.gameObject.GetComponent<vFSMBehaviourController>().ChangeState(VFSMStateEnter); } } private void OnTriggerExit(Collider other) { if (!IsInTagMask(other.tag)) return; { other.gameObject.GetComponent<vFSMBehaviourController>().ChangeState(VFSMStateExit); } } } } but when the AI enter or exit the trigger i get this error : NullReferenceException: Object reference not set to an instance of an object Invector.vCharacterController.AI.FSMBehaviour.OnTriggerChangeFSMState.OnTriggerEnter (UnityEngine.Collider other) (at Assets/BOK_System/Resources/Scripts/OnTriggerChangeFSMState.cs:17) NullReferenceException: Object reference not set to an instance of an object Invector.vCharacterController.AI.FSMBehaviour.OnTriggerChangeFSMState.OnTriggerExit (UnityEngine.Collider other) (at Assets/BOK_System/Resources/Scripts/OnTriggerChangeFSMState.cs:25) Thanks
|
|