Hi folks,
I’m new to unity and currently I’m running some tests. One test is a power up a player can obtain. I want the player accelerated into the direction the powerup is faceing. Since it is a 2D game the direction is tied to the z-rotation. 0=up, 90=left, 180=down, 270=right. So if the power up is rotated at 90° i want a force applied to the player. This is easy for the base direction, 0,90,180 and 270.
But how do i calculate the vector for e.g. 22° oder 98°?
I must admit my math knowledge is long gone and I’m currently working my way back to what i used to know. But until then i would appreciate a little hint
Thanks in advance,
Marc