neuromancer1978

07-25-2006, 08:38 PM

I tried this post in the Character Anim thread, but have no response so since this is more of an expression question figured I would try here instead? Any tips? Pointers? A slap in the face? :D

OK... so I am running a test to get expressions right, but because I suck at programming, I can't seem to get it right. Specificly with this scene, I have a sphere that moves in the direction when another object - a cylinder - moves (or translates, have yet to even figure out rotation). The expression I have so far works well, untill it reaches a certain point. When moving on the X axis it works fine, but once you reach a point and then move down the Z axis the ball totally moves in the opposite direction. I know it's something that can be fixed, but I got this expression off the net and just modified it a tad, but I have no idea WHERE to fix this.

(expression1)

ball.rotateZ = (box.translateX / (2 * 3.14 * 1)) * -360;

(expression2)

ball.rotateX = (box.translateZ / (2 * 3.14 * 1)) * -360;

I can upload the test scene (66kb) if anyone wants to see what it is I am talking about. Otherwise if you are an expression wiz I will be totally in your debt.

Ideas?

OK... so I am running a test to get expressions right, but because I suck at programming, I can't seem to get it right. Specificly with this scene, I have a sphere that moves in the direction when another object - a cylinder - moves (or translates, have yet to even figure out rotation). The expression I have so far works well, untill it reaches a certain point. When moving on the X axis it works fine, but once you reach a point and then move down the Z axis the ball totally moves in the opposite direction. I know it's something that can be fixed, but I got this expression off the net and just modified it a tad, but I have no idea WHERE to fix this.

(expression1)

ball.rotateZ = (box.translateX / (2 * 3.14 * 1)) * -360;

(expression2)

ball.rotateX = (box.translateZ / (2 * 3.14 * 1)) * -360;

I can upload the test scene (66kb) if anyone wants to see what it is I am talking about. Otherwise if you are an expression wiz I will be totally in your debt.

Ideas?