objDirection (warning - contains about 70kb of badly compressed jpgs)

Started by
3 comments, last by Dredge-Master 20 years, 8 months ago
I hope this gets read after khawk gets back nb: I put this in a new thread because of the jpegs (sorry about the low detailed compression - didn't want to tick of the dial up users) Basically, two little things with the objDirection data. First one (this COULD be intentional) is the direction returned is always a positive integer. This may be due to using functions that only return two quadrants with trig. eg, looking (opposing player that is) to the right we have a 95 degree angle and looking to the left we also have a positive 93 degree angle The second problem is not really significant as the client can fix it, and isn't really a problem either, just me being anal about capping the rotation. basically the angles can go over 180 degrees eg this one is up to 183 degrees. the highest I have got it was 220. (tis a link - tis 90kb) http://members.optushome.com.au/jlferry/gdarena/gdarena_007.jpg 360-183 solves this and gives back the correct angle (177). Look in the lower right for the data, the opposing player is on the last line in the TMemo Seperated the last image into a link as its rather big [edited by - Dredge-Master on August 12, 2003 10:11:11 PM]
Beer - the love catalystgood ol' homepage
Advertisement
KHawk has said that objDirection isn''t implemented properly yet.
oh fair enough then. Thanks sailorstick!
Beer - the love catalystgood ol' homepage
As far as I''ve understood the objDirection way of work. It returns 180 when the enemy is looking _straight_ to you and 0 when it''s looking at the other side. I''m not sure either if this is a bug or is intentional but anyway i''ve implemented it this way with my bot so it''s ok for me .
That''s how I understand it too, except with 4 quadrants, to one side they should be negative.

ie -180 through 0 to 180.
Beer - the love catalystgood ol' homepage

This topic is closed to new replies.

Advertisement