yep :|
only way i can think of is looking your running speed
throw me some ideas
yep :|
only way i can think of is looking your running speed
throw me some ideas
Cheap and easy - or you can actually do distance checks to see how far you should've gone, and how far you actually did go.Code:if (moving) { if (Location == OldLocation) { // Omfg, we're stuck! } OldLocation = Location; }
check out: http://mathproofs.blogspot.com/2005/...rediction.html
Last edited by BoogieManTM; 04-11-2009 at 02:06 AM.
Or you can use the TraceLine function and check if there is an object directly in front of you. I haven't tested this but it should work.
Or you can calculate your current speed
Speed = distance/time very basic math third grade or so.
Or just read ure current speed from the client. Cant remember the offset tho![]()
try /logic
Well if you want a serious answer...
I do not belive that CWorld::Intersect is usefull for checking if you are stuck.
Go for what BoogieManTM told you.
The problem is that CWorld::Intersect wont tell you, where you will get stuck. You will only be able to check if you are stuck between both vectors.
Is there any function telling, where the intersection is?
wrong...
imagine running up a wall where you climb up some pixels and fall down again.
location changes, you have a (low and changing) run speed but you are still stuck.
so you have to calculate the speed over a long period of time (~1sec or more)
and check it for being lower than some 0,x coors per second.
checking for "if ( speed == 0 )" will still fail in some cases since you move.
not much but you move forward and backward at a small scale.
if you know that you're running at 1 m/s, you will be moving 1 meter every second. if the position twp seconds earlier is below 2 meters from the one now, you didnt move properly.
yep, i did. standard maths.
im referring to the thing he wrote in his post.
doing it like that will just work in errrh maybe 10% of the "got stuck" cases.
so its not an alternative (as he expressed), its just fail![]()