|
Not HUMAN interaction - only USER interaction!
Clickety[^]
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Dang now I gotta start all over.
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
Had an annoying bug on the weekend.
Using C++ (which isn't my best language) and a rather awesome physics engine (Box2d) I was experiencing a strange situation where a physics object would seemingly randomly bounce madly around - shooting off into the air.
(very) long session followed. Could not track it down.
Even posted on their support site, and posted a video [^]in the hope someone could help.
Turns out that, in some code what I wrote, I implemented a form of rotational damping - which essentially stops objects rotating too quickly by calculating the desired angle, and allowing it to rotate there over several steps. (used to keep things reasonably upright)
Turns out that, under some circumstances the current angle was returning something like 0.0000002 radians. Which isn't equal to the desired angle (0) (even though it started at 0 degrees and has no forces acting on it) so I rotate the object - just a tiny wee bit!
But if that happens when it is touching the surface, it is forced to rotate through the surface!
This causes the engine to move it rapidly away, as it (I think) assumes a collision of some magnitude has occurred.
Bloody floats!
PooperPig - Coming Soon
|
|
|
|
|
Between the title and your sig I instantly thought of Bondi surf before they built the deep water outlet!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yup, you're not the only one
|
|
|
|
|
That was exactly the image I had in mind - although it was a beach in North Wales ...
PooperPig - Coming Soon
|
|
|
|
|
Would we not use a tolerance to check for real number equality?
#define EPSILON 0.000001
if (fabs(variableName) < EPSILON) { }
Or, am I way off in my understanding?
modified 16-Feb-15 3:47am.
|
|
|
|
|
Indeed I should have.
Actually, as someone else posted, I shouldn't rotate directly anyway, but apply a force - that would have solved the problem - but I should also have a level of tolerance!
This was one of those quick-fixes I stuck in there and promptly forgot about - and now have to fix.
I'll learn, none day, to just get it right in the first place
PooperPig - Coming Soon
|
|
|
|
|
_Maxxx_ wrote: I'll learn, none day, to just get it right in the first place
As a wise man once said, "There's never time to do it right, but there's always time to do it over."
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Are you adjusting the rotation of the object directly or are you applying forces to the object to get to your desired result?
If you apply forces / impulses to the object Box2D should be able to handle the collisions better.
I expect Box2D is seeing a penetration of 'x', then applying a force to the object that will separate the objects in 1 frame, which could lead to a very large impulse.
|
|
|
|
|
Yep - I'm (foolishly) adjusting the rotation directly!
I originally put in the code as a quick fix, for a single object, and forgot all about it.
You're right, I should apply an impulse to nod it in the right direction - perhaps I'll add that to my growing list of TODO:
PooperPig - Coming Soon
|
|
|
|
|
Sinking a floater!
Had a whole different thought in mind when I first read the header. Sticks, yellow gloves, perhaps a mask and goggles.
Ok breakfast is definitely postponed.
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
|
Sorry to say my first thoughts were of a swimming pool.
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|
|
Yeah that also came to mind.
I had a maintenance job one time in a factory full of women and one day I got a call that one of the toilets in the women's bathroom had backed up and there was water everywhere. Well when I went in there was a ?sinker? so big that it wouldn't go down so I had to get a stick and break it into pieces and flush piece by piece...sorry that's what I thought of when I read the header.
Some memories just stick with you...
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
Mike Hankey wrote: I had a maintenance job one time in a factory full of women
Oh my this can't be going somewhere positive.
Mike Hankey wrote: one day I got a call that one of the toilets in the women's bathroom had backed up and there was water everywhere
Did her water break?
Mike Hankey wrote: I went in there was a ?sinker? so big that it wouldn't go down
I hate when that happens.
Mike Hankey wrote: I had to get a stick and break it into pieces and flush piece by piece
You the man!
I don't have any first hand experience like you do, but the mental image still flashed in front of my eyes.
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|
|
I tell you what you would think that working with a bunch of women would be cool, sometimes was but most of the time a PITA.
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
I worked with a bunch of women one time. My biggest problem was keping one from finding out about the other.
Obviously, I was very young, dumb and full of *****. Need I say more.
Once you lose your pride the rest is easy.
In the end, only three things matter: how much you loved, how gently you lived, and how gracefully you let go of things not meant for you. – Buddha
Simply Elegant Designs JimmyRopes Designs
|
|
|
|
|
I was young also, married and had a kid but I still managed a little trouble.
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
A ship, sailing past a remote island, spots a man who has been stranded there for several years. The captain goes ashore to rescue the man and notices three huts.
“What’s the first hut for?” he asks.
“That’s my house,” says the castaway.
“What’s the second hut for?”
“That’s my church.”
“And the third hut?”
“Oh, that?” sniffs the castaway. “That’s the church I used to go to.”
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Must be a religious thing, because I don't get it...
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Strangely, there is a Scandinavian joke in the SoapBox that provoked the same response in me.
|
|
|
|
|
I know that you can say a lot about 50 shades, but calling it religious might be a little over the top...
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
No, I just meant I didn't get it.
|
|
|
|
|