You are viewing our Forum Archives. To view or take place in current topics click here.
C# Vector2 Class [need help]
Posted:
C# Vector2 Class [need help]Posted:
Status: Offline
Joined: Apr 29, 201113Year Member
Posts: 682
Reputation Power: 23
Coding in C#
so I'm writting out a Vector2 Class
i'm now doing angles and stuff I need to convert Vector Units into Degrees and Radians.
my problem with programming is I know what to do it just writing it out.
(need help with some other stuff too)
All to do with Physics in a game
so I'm writting out a Vector2 Class
i'm now doing angles and stuff I need to convert Vector Units into Degrees and Radians.
my problem with programming is I know what to do it just writing it out.
(need help with some other stuff too)
All to do with Physics in a game
#2. Posted:
Status: Offline
Joined: Jun 27, 201212Year Member
Posts: 36
Reputation Power: 1
Status: Offline
Joined: Jun 27, 201212Year Member
Posts: 36
Reputation Power: 1
Try using pseudo code to help you, helps me at university when developing large applications.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
Status: Offline
Joined: Aug 19, 201014Year Member
Posts: 5,243
Reputation Power: 532
I don't really understand what you are asking here..
Converting from degrees to radians is done by multiplying the angle by pi/180.
Converting from radians to degrees is done by multiplying the angle by 180/pi.
A Vector2 class should just have two values, x and y, not an angle.
You would need to multiply each component by the angle to get the new location.
You should look into matrices if you are handling game physics.
Converting from degrees to radians is done by multiplying the angle by pi/180.
Converting from radians to degrees is done by multiplying the angle by 180/pi.
A Vector2 class should just have two values, x and y, not an angle.
You would need to multiply each component by the angle to get the new location.
You should look into matrices if you are handling game physics.
- 4useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.