Page 1 of 1

Strange velocity bug.

PostPosted: Sat Jun 05, 2021 8:21 am
by Xray
If the velocity values [x,y] are manually entered into ANY object which is glued to the background, then ALL other objects which are glued to the background will receive that entered value! Also, any non-glued object will propel off any glued object with a velocity that equals the entered velocity value!

See my example scene: Strange Velocity Bug

Re: Strange velocity bug.

PostPosted: Thu Sep 09, 2021 10:59 pm
by FRA32
The cause for this bug is the fact that all glued objects, including things like planes, share the same body group. If you enter a velocity into any of them however, then algodoo assumes that velocity for the entire body group during physics calculations, and since fixed bodies can't have their velocity changed, this velocity becomes permanent. Since glued objects however are strictly prohibited from moving, they still remain in place despite this. The consequence is that every collision with a glued object behaves as if the glued object was moving with the specified velocity, thus transferring a part of that velocity onto the colliding object.

Re: Strange velocity bug.

PostPosted: Fri Sep 10, 2021 4:53 am
by Xray
Hi FRA32!

I agree. Your explanation seems completely reasonable.

You said: "Since glued objects however are strictly prohibited from moving..."
Well, that is only partially correct. Objects that are glued to the background cannot move by changing their velocity vectors, but they CAN move by changing their POS values (I'm not sure if Algodoo X and Y POS values are considered scalars or vectors).

Thanks for your explanation. It was very helpful! :thumbup:

Re: Strange velocity bug.

PostPosted: Wed Sep 15, 2021 11:30 am
by FRA32
Well that obviously depends on what your definition of "moving" is. :ugeek: I would define overwriting the POS as less moving, more teleporting, but in the end, isn't movement in a computer program nothing but the perpetual teleportation of objects in tiny increments? :lol:

Also, I am pretty sure the POS in thyme itself is stored as a mere array filled with 2 floating-point-numbers. The Algodoo software then interprets those values and puts them into yet another array as part of a "Vector2D" class of sorts for mathematical purposes.

Re: Strange velocity bug.

PostPosted: Wed Sep 15, 2021 3:45 pm
by Xray
Yeah, the term "moving" can be defined multiple ways in Algodoo. Obviously objects in Algodoo do not behave like real world objects. They can be made to do all kinds of magical things that defy our normal laws of physics. That's what makes programming so much fun! :thumbup: