collinhover / impactplusplus

Impact++ is a collection of additions to ImpactJS with full featured physics, dynamic lighting, UI, abilities, and more.
http://collinhover.github.com/impactplusplus
MIT License
276 stars 59 forks source link

Fix for Issue #145 (Added a faceTarget check to the activateComplete method) #146

Closed Pattentrick closed 10 years ago

Pattentrick commented 10 years ago

Added a check for the faceTarget property of the shoot ability, to fix some unwanted animation behavior (issue #145).

collinhover commented 10 years ago

Should the check be for the ability's faceTarget property instead of the entity's?

Pattentrick commented 10 years ago

There is no faceTarget property on the entity, we want to check the property of the ability, so it should be:

javascript if (this.faceTarget){

this.entity.lookAt(projectile);

}



Am I right? This was another dumb typo from me. Sorry for the mistake. Doing to many things simultaneously right now. I will correct this once I am back home. Please correct me if I am totally wrong on this ;-)
collinhover commented 10 years ago

No worries man, I think that looks right. Thanks for submitting the fix :-)