I bought Third Person Controller and creating a character through the usual setup, then shooting at it leads to bullet decals showing up on the capsule collider bounds but not on the actual mesh. How do I fix this?
In addition I'm trying to create a surface effect in which objects get parented immediately to the character hit after spawning. So I would guess that I would have to do something like this in SurfaceEffect.cs but I'm not sure how to get the right object for the character to parent to here?
Lastly, I'm trying to make it so that the rotation of objects spawned in a Surface Effect changes according to the angle of the bullet impact (and not totally random as with "Random Spin"). But not even sure where to start with that.
Thanks for the help.
In addition I'm trying to create a surface effect in which objects get parented immediately to the character hit after spawning. So I would guess that I would have to do something like this in SurfaceEffect.cs but I'm not sure how to get the right object for the character to parent to here?
Code:
/// <summary>
/// Instantiates the Spawned Objects.
/// </summary>
/// <param name="hit">The RaycastHit which caused the collision.</param>
/// <param name="gravityDirection">The normalized direction of the character's gravity.</param>
private void SpawnObjects(RaycastHit hit, Vector3 gravityDirection)
{
for (int i = 0; i < m_SpawnedObjects.Length; ++i) {
if (m_SpawnedObjects[i] == null) {
continue;
}
m_SpawnedObjects[i].Instantiate(hit.point, hit.normal, gravityDirection);
m_SpawnedObjects[i].Object.transform.SetParent() ///How to get the right character here?
}
}
Lastly, I'm trying to make it so that the rotation of objects spawned in a Surface Effect changes according to the angle of the bullet impact (and not totally random as with "Random Spin"). But not even sure where to start with that.
Thanks for the help.
Last edited: