Search:
Type: Posts; User: Nialsh
Search:
Search took 0.03 seconds.

This is a great way to teach physics. I definitely understand LRC circuits better for having played with this. I also have a lot of suggestions.
The dynamic text boxes on the bottom should be...

var x = /* user input */
if (x < 10) {
// bottom unbounded range x < 10
} else if (x < 15) {
// 10 <= x < 15
} else if (x < 20) {
// 15 <= x < 20
} else {
// top unbounded range x...

I'm not aware of a tutorial but generally speaking, that system is called an inverted pendulum.
You can find a lot more about it here http://en.wikipedia.org/wiki/Inverted_pendulum

If you're pretty certain that you won't change your mind about representing the player's shape as a nonrotating rectangle, you can keep the math simple. Just check to see which dimension has the...

You're checking the vertical cases before the horizontal cases, so they're winning every time.
Try making them weaker.
function CollisionObjectTile(object)
{
var BOUNCE = 0.5;
var...

It depends how realistic you want to get. Like if you drive off a ramp, should the bike stay airborne for a couple of seconds? Should it behave like this game?...

That site looks like it gives a pretty thorough explanation of what needs to be done.
I assume you're trying to implement a function like this
import flash.geom.Vector3D;
function...

What you're talking about is "continuous" versus "discrete" physics simulation.
Until you start dealing with collisions, continuous simulation is actually quite easy. The arcs you see in Sling...

Check out the last section of this page on pool physics http://archive.ncsa.illinois.edu/Classes/MATH198/townsend/math.html
It even tells you how to calculate the spin, if you're into that sort of...

At the end of HitTestPoint.as, I uncommented
camera.x = player.x;
camera.y = player.y;
and that seemed to fix it...
I'm using CS5 if that means anything.

Interesting question. I think I figured something out.
Let's say the normal vector for a flat sprite is pointing out of the page (ie. <0,0,1>). You can use your the transformation matrix from...

Normally sprites are 2D so I'm not sure what you would be doing with a 3D vector...
Can you give an example of what you're doing?

Suthers,
Welcome to flashkit, I see you've found all the old threads.
If you look at Adobe's documentation, the parameters for atan2 are actually (y,x)....

If you points are A and B, your normals are:
<ByAy, AxBx>
<AyBy, BxAx>

How is your line defined? Is it a line segment formed by two points?

A line has two normal vectors, pointing in opposite directions.
If you know the angle of the line (theta) in radians, the angles of the normal vectors are:
theta+PI/2
thetaPI/2
Or if you...

Not sure what you mean. Why don't you draw a picture and post it?

Cool game. I agree the controls could use some help. But it came together nicely.
Here's how I would set power. http://megaswf.com/view/1f6a1593a9de3086ce223c46f400613b.html
And maybe make...

Here you go. I fixed that other code but decided it was the wrong approach, so here's another take.
function onRollOver():Void {
lightning._alpha = 100;
videostopped = true;
var xOffset...

Yeah, you can get away with just one arrow. Here's some code off the top of my head.
function onRollOver():Void {
lightning._alpha = 100;
videostopped = true;
var...

length of BC = L*tan(angle CAB)
length of BD = L*tan(angle DAB)
Tangent is a good function to know. http://en.wikipedia.org/wiki/Trigonometric_functions#Tangent
In Flash it's Math.tan(). ...

Put that command in an onEnterFrame?

This should do it.
var feet=(6*ammount)/100;
var inches=Math.floor(12*(feetMath.floor(feet)));
feet=Math.floor(feet);
if(feet == 0)
loader.feettext.text="";
else
...

I've never seen a Flash program that allocated too much memory. Making things invisible can make improve speed because it reduces the rendering time. But I wouldn't worry about it  just write your...

Yeah, I don't know why nobody answered you...
What you're talking about is called "rigid body dynamics". It's a branch of physics that describes the way rigid objects move (and collide) in space....

Click Here to Expand Forum to Full Width
