tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited April 2015
@Socks said:
10 percent from the top is 40 percent from the centre.
Voodoo! Or math. Not sure which.
ok, i get it, i'll state that if it's > 40 percent then.... whatever.
You would need ≥ 40% of the height from the center. The center Y value is self.Position.Y so you'd want to check to see if the position of the bullet/target is ≥ 0.4*self.Size.Height+self.Position.Y AND ≤ self.Size.Height/2+self.position.Y.
@tatiang said:
You would need ≥ 40% of the height from the center. The center Y value is self.Position.Y so you'd want to check to see if the position of the bullet/target is ≥ 0.4*self.Size.Height+self.Position.Y AND ≤ self.Size.Height/2+self.position.Y.
holy s*** you just rattled what little brain I have haha, thanks though
Answers
Voodoo! Or math. Not sure which.
You would need ≥ 40% of the height from the center. The center Y value is self.Position.Y so you'd want to check to see if the position of the bullet/target is ≥ 0.4*self.Size.Height+self.Position.Y AND ≤ self.Size.Height/2+self.position.Y.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
holy s*** you just rattled what little brain I have haha, thanks though