glovemaster Posted April 13, 2008 Share Posted April 13, 2008 AngleToVector Calculator This tool will calculate the Orientation X and Y from an angle that you specify, I have also implemented a "VectorToAngle" function, which you can specify the X and Y coordinates and it will calculate the angle. Click on the title to download ^. Using the Calculator I must also note how the calculator works in relation to KotOR. KotOR uses an orientation system like so: The angle is expressed as anticlockwise degrees from Due East. DIRECTION_EAST, DIRECTION_NORTH, DIRECTION_WEST and DIRECTION_SOUTH are predefined. (0.0f=East, 90.0f=North, 180.0f=West, 270.0f=South) Therefore, if you want your character to face north then the angle you need to enter is 90*, and for North-East 45*. v1.4 Added an "Angle Chooser" where you can choose an angle from a wheel. Automated it, so you don't have to click a "calculate" button. Pratted around with the interface, since I'm arkward =P Fixed the code so it doesn't crash when you type in letters because you think its funny. v1.3 Numbers rounded to 6dp, also slight bug fix, where VectorToAngle will show angles > 180 as a negative angle. v1.2 Calcalator now can convert a Bearing to an Angle. v1.1 Calculator now also generates a bearing. v1.0 First Release, program can calculate AngleToVector and VectorToAngle. Any suggestions are welcome. Link to comment Share on other sites More sharing options...
Ferc Kast Posted April 13, 2008 Share Posted April 13, 2008 Wow; This should help a lot in one of my WIPs. Can't wait to try it out. Link to comment Share on other sites More sharing options...
Silveredge9 Posted April 13, 2008 Share Posted April 13, 2008 Great tool, so far I've been using a list of X and Y coordinates that I found in an old thread for modding - But this is much easier. Nice work. Link to comment Share on other sites More sharing options...
sekan Posted April 13, 2008 Share Posted April 13, 2008 Wow, this is making my work much much much easier. Great work GM Link to comment Share on other sites More sharing options...
glovemaster Posted April 14, 2008 Author Share Posted April 14, 2008 Just a quick update; I have just added a box where it will generate the bearing, for placeables. Also considering making a "BearingToAngle" part of the calculator. Link to comment Share on other sites More sharing options...
Darth InSidious Posted April 14, 2008 Share Posted April 14, 2008 Nice work - I wish this had existed when I started modding. Link to comment Share on other sites More sharing options...
glovemaster Posted April 14, 2008 Author Share Posted April 14, 2008 Proberly the last fix, I don't want to bloat the thing with unnecessary functions, I have finished the BearingToAngle bit, unless any bug fixes are required, thats the finished calculator Link to comment Share on other sites More sharing options...
Marius Fett Posted April 14, 2008 Share Posted April 14, 2008 Verrrrrry nice GM! This'll DEFINITELY come in handy! Link to comment Share on other sites More sharing options...
tk102 Posted April 14, 2008 Share Posted April 14, 2008 There goes the motivation to learn trig functions. Just a small suggestion: it'd be nice if any number with an absolute value < 1x10^-6 was rounded down to zero. Link to comment Share on other sites More sharing options...
glovemaster Posted April 14, 2008 Author Share Posted April 14, 2008 So like, round the numbers to 6 decimal places? And I know what you mean about the stupidly small angles. I'll have em rounded to 0 EDIT: 14/04/08 Done that I also fixed a bug with the VectorToAngle part. Link to comment Share on other sites More sharing options...
glovemaster Posted May 11, 2008 Author Share Posted May 11, 2008 While playing about with the program interface today (Its been updated I might add ) I realised that something that was rather obvious to me might not be quite so obvious for someone will little programming or modding experience. Using the Calculator I must also note how the calculator works in relation to KotOR. KotOR uses an orientation system like so: North: 90* East: 0* South: -90* West: 180* Therefore, if you want your character to face north then the angle you need to enter is 90*, and for North-East 45*. The same is found with the SetFacing() Function. // 10: Cause the caller to face fDirection. // - fDirection is expressed as anticlockwise degrees from Due East. // DIRECTION_EAST, DIRECTION_NORTH, DIRECTION_WEST and DIRECTION_SOUTH are // predefined. (0.0f=East, 90.0f=North, 180.0f=West, 270.0f=South) void SetFacing(float fDirection); Link to comment Share on other sites More sharing options...
glovemaster Posted July 3, 2008 Author Share Posted July 3, 2008 Update: Much more stable, included "Angle Chooser", Automated with error highlighting. v1.4 Added an "Angle Chooser" where you can choose an angle from a wheel. Automated it, so you don't have to click a "calculate" button. Pratted around with the interface, since I'm arkward =P Fixed the code so it doesn't crash when you type in letters because you think its funny. Link to comment Share on other sites More sharing options...
sekan Posted July 3, 2008 Share Posted July 3, 2008 Download link dosen't work for me Link to comment Share on other sites More sharing options...
glovemaster Posted July 3, 2008 Author Share Posted July 3, 2008 Thats a problem on the host's side, nothing I can do about that I'm guessing it will only be for a while, I can only suggest trying again some time later... Link to comment Share on other sites More sharing options...
sekan Posted July 3, 2008 Share Posted July 3, 2008 It's working again now Link to comment Share on other sites More sharing options...
glovemaster Posted May 28, 2013 Author Share Posted May 28, 2013 I have updated the link for this as it has apparently been down for some years Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.