Code center > Bugs and fixes
Something wrong with tie physics
PurpleYouko:
I spent a little bit of time yesterday tinkering with a couple of my old MBs, more specifically Inchworm and his decendant Inchworm2 (I know it is a crappy name but WTF)
It soon became apparent that something is messed up with the way he moves in V2.36 (all versions) :blink:
He should move by fixing one end then expanding and contracting then fixing the other end.
Rotation should be done by moving one end in an arc around the "fixed" end.
What actually happens is that both ends kind of slide sideways in a big arc around a point about three or four robot diameters beyond the fixed end of the MB.
Check out my poor little Inchworm2 and you will see what I mean.
I had better go in and figure out what is going on here I think.
Numsgil:
Be careful when you do figure it out that you don't 'fix' it wrong.
It may be that physics are working more correctly than they were before, and the old versions were based on incorrect physics.
That said, I don't think I've even touched ties, so it's not my fault (:grin:).
Shen:
It seems like the bounceback from a stretched/compressed tie overrides the fixpos. Maybe the tie physics are just after the fix code like that velocity bug was. (Not that I can program to save the world)
PurpleYouko:
There are actually a couple of issues I think.
1) The main one I think is that fixpos appears to be slightly messed up. "fixed" stuff appears to be able to move a little. Try fixing the veggies and watch the way impacts make them move a bit.
2) There is a routine in the multi-bot section which transfers about 50% of any applied acceleration on a robot, to its tied partner. This should only work for direct accelerations such as .up, .dn etc. but appears to be working with all accelerations including those imparted on the robots by ties.
The whole thing is most likely to be a case of a single line of code being in the wrong place with respect to another one.
I don't think I will need to touch the actual physics. Just fix it so that "fixed" bots really are fixed
On a slightly different note, thinking about the way that some accelerations are auatomatically transferred across ties has made me start to work out how MBs can actually be moved as a whole.
We might need a whole new command system to communicate instantly throughout the bot. I will let you know if I come up with a workable method. I have the beginnings of such a system going round in my mind right now but it hasn't completely congealed yet. :wacko:
PurpleYouko:
Well that was easy. :D
It seems that in the old physics system, no acceleration was added to robots if they were "fixed"
I deleted a whole bunch of that code when I simplified the physics module for 2.36 in order to make it run faster and be more realistic.
Trouble is that now accelerations added by tie physics and collisions, are acted on even by "fixed" robots.
The answer was just to make movement conditional on being "NOT Fixed"
Simple really.
Now to move onto bigger and better things :D
Navigation
[0] Message Index
[#] Next page
Go to full version