|
-
You should go with calculating distance. I cant see how your code would work as it is..
dL=Math.sqrt(dx1*dx1);
is just a slower way of saying:
dL = Math.abs(dx1);
(and I think only needed if your vehicle turns upside down?)
But how can you know if the wheels are too far apart when treating the x and y seperately?
you need a proper distance calculation, ie.
dL=Math.sqrt(dx1*dx1 + dy1*dy1);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|