Hi, I'm creating a knockback system. I have multiple knockback spells and want them to add up to each other. Please let me know if there is a better way of doing this but I decided to break it up into X and Y movement.
I haven't done any proper maths for a while now and I want to know how to break down a vector into its components.
Example: I have a knockback distance of n*SQRT(2) at an angle of 45 degrees would have an X distance of n and a Y distance of n.
So given the angle and a distance, I need its X and Y components. Unless someone has a better knockback system that allows units to be knocked around by multiple sources.
I haven't done any proper maths for a while now and I want to know how to break down a vector into its components.
Example: I have a knockback distance of n*SQRT(2) at an angle of 45 degrees would have an X distance of n and a Y distance of n.
So given the angle and a distance, I need its X and Y components. Unless someone has a better knockback system that allows units to be knocked around by multiple sources.