Zer0 148 Posted January 5, 2023 Share Posted January 5, 2023 Hi, I have noticed that TraceLine.TraceLineGo doesn't update its result immediately when called repeatedly. The best example I can give is when I try to check the LoS for a door. I go in front of a closed door, check for LoS, which returns a positive result (so, no LoS). The method takes roughly 15ms to execute. Then I open the door, but even when the door is open, TraceLine.TraceLineGo keeps returning a positive result, and seems to only update at a random time after a few seconds, sometimes minutes. I'm thinking this is a cached result because when returning wrong results, the method takes 0ms. What exactly is going on here? Does this method have a cache? If so, is there a way to not use cached results at all? Any insight is appreciated. Link to comment https://wrobot.eu/forums/topic/14986-tracelinetracelinego-cache/ Share on other sites More sharing options...
Zan 99 Posted January 5, 2023 Share Posted January 5, 2023 Temp fix, second check a traceline just slightly different from the original coords beyond the door. Hopefully there is a way to clear that cache though. Link to comment https://wrobot.eu/forums/topic/14986-tracelinetracelinego-cache/#findComment-67464 Share on other sites More sharing options...
Zer0 148 Posted January 5, 2023 Author Share Posted January 5, 2023 2 hours ago, Zan said: Temp fix, second check a traceline just slightly different from the original coords beyond the door. Hopefully there is a way to clear that cache though. Unfortunately, among the many things I've tried, I did that. I even tried to check 10 random tracelines between the ones I wanted. You know, for science. Even then, the results were all cached somewhere, for a time at least. Link to comment https://wrobot.eu/forums/topic/14986-tracelinetracelinego-cache/#findComment-67465 Share on other sites More sharing options...
Droidz 2738 Posted January 6, 2023 Share Posted January 6, 2023 Hi, I added method TraceLine.ClearCache() (wait next update) Zer0, Zan and Talamin 3 Link to comment https://wrobot.eu/forums/topic/14986-tracelinetracelinego-cache/#findComment-67469 Share on other sites More sharing options...
Zer0 148 Posted January 6, 2023 Author Share Posted January 6, 2023 Thank you so much! Link to comment https://wrobot.eu/forums/topic/14986-tracelinetracelinego-cache/#findComment-67470 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now