Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 02 May 2001
Offline Last Active May 14 2015 01:56 PM

Posts I've Made

In Topic: Confused about linear forces and rotation

10 March 2015 - 09:52 PM

Thanks! Apparently my intuitions were completely wrong.


I still don't really get why the friction would matter. The friction is the same in both scenarios (right?) and the linear forces are the same (right?). I'm unable to intuit.

In Topic: Need help with 2D puddle

28 May 2014 - 10:00 PM

I darkened and smoothed it, and now I'm feeling a bit better about it. It's a big improvement over what I had. But it still doesn't look quite right. It looks like a dried wax seal rather than a puddle of goo. I think I'll try to smooth out the edges a bit to make it look more wet and gooey.


Attached File  puddle4.jpg   224.7KB   10 downloads

In Topic: Need help with 2D puddle

26 May 2014 - 03:10 PM

It's flat circle.


Here is another attempt. I based it on the blood decal, so it fits a little better, but it doesn't really look like a puddle. It looks more like... I'm not sure. But I think I'm going in the right direction. I just wish I knew how to make it look more puddle-y. Should the interior be smoother? And making a green puddle contrast against the green grass is tricky.


Attached File  puddle3.jpg   202.8KB   12 downloads

In Topic: Need help with 2D puddle

24 May 2014 - 08:37 PM

I like that a bit better than what I have. Here is my attempt (The dark spots aren't part of the decal. That's a bit of green smoke left by a kitten before it dissolved):


Attached File  puddle2.jpg   199.23KB   10 downloads


But there's still something off about it. It could just be that it doesn't jibe with the blood. The blood is a little more realistic but the goop is very stylized.

In Topic: Moving pendulum

23 November 2012 - 05:20 PM

I think that diagram may have been more confusing than helpful (plus I found at least one bug in my code). After some more work I came up with this, and it seems to work ALMOST correctly (in 2 dimensions, even), except when I really start slinging the cursor around. It seems like the pendulum bob should be held straight out by centrifugal force, but instead it kind of starts jumping around erradically until it looses some velocity and settles down.

[source lang="csharp"]private void update(float elapsedTime, int x, int y){ // figure out the current mouse velocity Vector3 vel = new Vector3(); vel.X = x - _position.X; vel.Y = 0; vel.Z = y - _position.Z; vel /= elapsedTime; // compare the current velocity with the old to calculate acceleration Vector3 acceleration = (vel - _oldVelocity) / elapsedTime; acceleration.Y = -90000.0f * elapsedTime; _oldVelocity = vel; // calculate the XY plane angular velocity float accelerationZ = acceleration.Z; acceleration.Z = 0; float b = (float)Math.Atan2(acceleration.Y, acceleration.X); float a = acceleration.Length() * (float)Math.Cos(b - (_bobAngle.X - MathHelper.PiOver2)); _bobAngularVelocity.X += a / _springLength * elapsedTime; // calculate the YZ plane angular velocity acceleration.Z = accelerationZ; acceleration.X = 0; b = (float)Math.Atan2(acceleration.Y, accelerationZ); a = acceleration.Length() * (float)Math.Cos(b - (_bobAngle.Y - MathHelper.PiOver2)); _bobAngularVelocity.Y += a / _springLength * elapsedTime; // apply damping _bobAngularVelocity -= _bobAngularVelocity * 2.0f * elapsedTime; // apply velocity _bobAngle.X += _bobAngularVelocity.X * elapsedTime; _bobAngle.Y += _bobAngularVelocity.Y * elapsedTime; _bobAngle.X = MathHelper.WrapAngle(_bobAngle.X); _bobAngle.Y = MathHelper.WrapAngle(_bobAngle.Y); _position.X = x; _position.Z = y;}[/source]