kospy
New vMember
Posts: 3
|
Post by kospy on Jul 11, 2017 21:11:12 GMT
It seem that there is bug about the checkbox "Remove components after die". This checkbox do nothing, and the components are still being removed even if it's not checked. I'm using the latest version (2.2c). To fix this, I added a line in v_AIMotor.cs: protected void RemoveComponents()
{
if (!removeComponentsAfterDie) return; // Added this line
if (_capsuleCollider != null) Destroy(_capsuleCollider);
if (_rigidbody != null) Destroy(_rigidbody);
if (animator != null) Destroy(animator);
if (agent != null) Destroy(agent);
var comps = GetComponents<MonoBehaviour>();
for(int i=0;i<comps.Length;i++)
{
Destroy(comps[i]);
}
} It seems to be an oversight. Fortunately that will be an easy fix for the next version
|
|
|
Post by lokiare on May 2, 2018 8:46:17 GMT
My third person controller is doing this now also. I've checked the code and this fix is already there.
|
|
|
Post by lokiare on May 2, 2018 12:14:25 GMT
My third person controller is doing this now also. I've checked the code and this fix is already there. It was the vGameController. If you leave the controller field empty, it just restarts the level. I put my controller in, but left the spawner empty, so now it lets me put the player wherever I want, and they don't lose their inventory.
|
|