SkepsonSk
Verified Member
Hello guys !
I am currently trying to use mathematical forumals in my abilities and it works, but only in one axis ;(
I mean, when I trigger the ability and I'm pointing north or east - it's ok, but if not - it is bugging.
This is my progress method (currentPosition is position of the blast and movement is ... Movement):
I would be very grateful if You helped me
Lots of love
I am currently trying to use mathematical forumals in my abilities and it works, but only in one axis ;(
I mean, when I trigger the ability and I'm pointing north or east - it's ok, but if not - it is bugging.
This is my progress method (currentPosition is position of the blast and movement is ... Movement):
Code:
@Override
public void progress() {
if (player.isDead() || currentPosition.distance(origin) > 100){
remove();
return;
}
displayParticleEffects();
time ++;
double sin = Math.sin( time * 0.75 );
currentPosition.add( movement.setX(sin) );
return;
}
Lots of love