A Flash Developer Resource Site

Search:

Type: Posts; User: Nialsh

Page 1 of 14 1

Search: Search took 8.16 seconds.

by Nialsh
Replies
4
Views
10,222

This is a great way to teach physics. I...

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...

by Nialsh
Replies
1
Views
5,435

var x = /* user input */ if (x < 10) { //...

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...

by Nialsh
Replies
1
Views
7,364

I'm not aware of a tutorial but generally...

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

by Nialsh
Replies
3
Views
11,250

If you're pretty certain that you won't change...

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

by Nialsh
Replies
3
Views
11,250

You're checking the vertical cases before 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...

by Nialsh
Replies
1
Views
388

It depends how realistic you want to get. Like...

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?...
7. Thread: How to detect the point of intersection of a Line and a Triangle (3D)

by Nialsh
Replies
2
Views
5,821

That site looks like it gives a pretty thorough...

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...

by Nialsh
Replies
3
Views
6,150

What you're talking about is "continuous" versus...

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...

by Nialsh
Replies
1
Views
4,068

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...
10. Thread: Scrolling Top Down with Hit Test (Brute Force)

by Nialsh
Replies
2
Views
1,017

At the end of HitTestPoint.as, I uncommented ...

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.
11. Thread: Finding the normal vector of rotated object

by Nialsh
Replies
5
Views
4,125

Interesting question. I think I figured...

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...
12. Thread: Finding the normal vector of rotated object

by Nialsh
Replies
5
Views
4,125

Normally sprites are 2D so I'm not sure what you...

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?
13. Thread: Simple problem, how to get angle between two points?

by Nialsh
Replies
5
Views
30,174

Suthers, Welcome to flashkit, I see you've...

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)....
14. Thread: How to draw the normal to line

by Nialsh
Replies
8
Views
6,199

If you points are A and B, your normals are:...

If you points are A and B, your normals are:
<By-Ay, Ax-Bx>
<Ay-By, Bx-Ax>
15. Thread: How to draw the normal to line

by Nialsh
Replies
8
Views
6,199

How is your line defined? Is it a line segment...

How is your line defined? Is it a line segment formed by two points?
16. Thread: How to draw the normal to line

by Nialsh
Replies
8
Views
6,199

A line has two normal vectors, pointing in...

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
theta-PI/2

Or if you...
17. Thread: How to draw the normal to line

by Nialsh
Replies
8
Views
6,199

Not sure what you mean. Why don't you draw a...

Not sure what you mean. Why don't you draw a picture and post it?
18. Thread: [game] "Whoosh!" Something to actually show for myself, heh

by Nialsh
Replies
15
Views
2,473

Cool game. I agree the controls could use some...

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...

by Nialsh
Replies
5
Views
4,210

Here you go. I fixed that other code but decided...

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...

by Nialsh
Replies
5
Views
4,210

Yeah, you can get away with just one arrow. ...

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...
21. Thread: Need help finding coordinates of a triangle

by Nialsh
Replies
3
Views
4,418

length of BC = L*tan(angle CAB) length of BD =...

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(). ...

by Nialsh
Replies
3
Views
1,497

Put that command in an onEnterFrame?

Put that command in an onEnterFrame?

by Nialsh
Replies
10
Views
946

This should do it. var feet=(6*ammount)/100;...

This should do it.

var feet=(6*ammount)/100;
var inches=Math.floor(12*(feet-Math.floor(feet)));
feet=Math.floor(feet);
if(feet == 0)
else
...
24. Thread: [RESOLVED] two rectangle collision REACTION

by Nialsh
Replies
7
Views
5,005

I've never seen a Flash program that allocated...

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...
25. Thread: [RESOLVED] two rectangle collision REACTION

by Nialsh
Replies
7
Views
5,005

Yeah, I don't know why nobody answered you... ...

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....
Results 1 to 25 of 338
Page 1 of 14 1

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap