Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Formula for trajectory of object reflecting on walls?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
microsoftv
Advanced Cheater
Reputation: 0

Joined: 07 Apr 2016
Posts: 82
Location: U.S

PostPosted: Sat Oct 08, 2016 6:47 pm    Post subject: Formula for trajectory of object reflecting on walls? Reply with quote

I'm coding a bot for a 2d game that uses only rectangular planes and uses degrees for angles (but in weird fashion). However I don't know a formula (more or less, there isn't one) that can determine trajectory of an object with infinite speed and no gravity, however because it has infinite speed, whenever the object hits a wall, there is a 200 millisecond delay before it moves from the wall again, after 200 ms is up, the trajectory/angle is reflected depending on if it hit the ceiling (y-axis) or the wall (x-axis). An example for a straight angle is determined by if the ytrajectory is = 0 and the xtrajectory is 65536, if the xtrajectory is - then it is going left, positive is right, if ytrajectory is positive, it's going down, negative, up. I need to determine if that object will end up hitting the bot the next time it reflects it's angle off of a wall/ceiling. Here is another example of a down, left angle, the xtrajectory = -32768, ytrajectory = 56756:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites