Blood particles distance fix
This commit is contained in:
parent
eafc0c63b6
commit
48041ea26e
@ -105,7 +105,7 @@ ParticleSystem:
|
|||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
moveWithTransform: 0
|
moveWithTransform: 1
|
||||||
moveWithCustomTransform: {fileID: 0}
|
moveWithCustomTransform: {fileID: 0}
|
||||||
scalingMode: 1
|
scalingMode: 1
|
||||||
randomSeed: 0
|
randomSeed: 0
|
||||||
|
|||||||
@ -78,6 +78,7 @@ public class BloodSucker : MonoBehaviour {
|
|||||||
|
|
||||||
void PerformSuck(float deltaTime) {
|
void PerformSuck(float deltaTime) {
|
||||||
bloodParticles.gameObject.transform.rotation = Quaternion.FromToRotation(transform.right, currentTarget.transform.position - transform.position);
|
bloodParticles.gameObject.transform.rotation = Quaternion.FromToRotation(transform.right, currentTarget.transform.position - transform.position);
|
||||||
|
bloodParticles.gameObject.transform.localScale = Vector3.one * (Vector3.Distance(currentTarget.transform.position, transform.position) + 1f) / 4f;
|
||||||
|
|
||||||
currentSuckTimer -= deltaTime;
|
currentSuckTimer -= deltaTime;
|
||||||
if (currentSuckTimer < 0f) {
|
if (currentSuckTimer < 0f) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user