Search:
Type: Posts; User: Multihunter
Search:
Search took 0.02 seconds.
-
I uhh... I may have caused it to happen again... I have no idea why, but when I moved it from a movieclip into an as file it started being unable to work out the proper possible directions again...
...
-
ok, so I got it working by making the actual drawing part a function and calling the function; why is it that THAT works?
-
I have a class; "Game".
I have a bitmap in the library; "Grass"
I want to be able to run a function from the main timeline that uses the bitmap inside of a movieClip.
My current attempt is as...
-
I did, I just had to add in the "TileArray[CurrentSection][0]=1;"
-
Ok, thanks for doing that, but I already had code for drawing it, I just wanted to know why my while loop wasn't working, and I see you worked it out too. I realised like 5 minutes after I turned my...
-
Using the source code on this webpage as a guide, I've basically re-written it in AS3. Unfortunately, it doesn't work as it should.
I've attached the code that I am using that is just in the root...
-
Oh, ok, by "error" I meant find out which line is unable to run. Then use that to follow where the error is coming.
For trace(), when you put:
trace("Hello")
It will put "Hello" in the output...
-
Ok, so if I understand correctly, you have:
var count:uint = count+1
looped?
You're declaring it a new variable every loop. You only need to delcare it once, so at the beginning of your code...
-
I want to reference an object at what would have been at _level0 or _root in AS2, but I don't know how to do it in AS3...
-
Well, really var count will be the equivalent of your ImageNumber, so:
if (count >= numberOfImages) {
count = 0
}
Just watch where you put that stuff; make sure that count isn't going to...
-
You could always manually check over all the places where the things is modified in some way.
If you use the error and trace() to find out WHERE it becomes undefined you can know WHY it is.
-
I use arrays for this kind of thing.
I don't know if it's the most efficient method, but it works fine for me... until I get too complicated for myself to follow, but, you know... it works.
What...
-
Nice try, Eager Beaver, but;
-That ones collision detection is no better than a simple: "If the distance between them will be the averaged(?) radius next frame, then they have collided".
-They...
-
EDIT: When you are colliding two objects, you do a for() loop on the array inside of itself, so each one is checked against every other one. There is a way to optimise that, since a lot of the...
-
EDIT3: Yeah, read this part first. What you are going to eventually have to do is put all of the circles into an array and then check each circle against each other. I'm too tired to explain how to...
-
Cool, I have my own method?
Yeah. It's flawed in the timing, but the math is fine. I was going to go in and fix up the timing somewhat. In fact I will do that now! (As a side note, at the moment I...
-
Ok, if you are only going to do it approximately, you only have to check each frame whether they are touching by measuring the distance between them. Which, we use pythagora's rule of c^2 = a^2 +...
-
Thank you newblack, you helped me so much. I didn't realise that it was so simple; dx was the proportion of the xvelocity that takes part in the collision! My problem was that I over complicated the...
-
Ok. We did a lot on graphs last year in Maths, so I decided to try once again to work it out with gradients, see if it looked like what the vectors were and see if I could link them or come up with...
-
Well that last bit was edited in before the "earlier" edit, hence the 2 next to it to indicate it came later.
If you look at the original formula you gave for impulse; j = ( -( 1 + e ) * ( m1v1 -...
-
Ok, nearly there (I think).
I worked out that according to that you had there;
Momentum of Circle1 - Momentum of Circle2 = dx*dvx + dy*dvy
How does that work?
EDIT2: Maybe that's the dot...
-
Ok, I now have a much better understand of where this is all coming from.
Thank you.
Just... I still can't quite figure out what you've done there...
When you normalised dx and dy, you made it...
-
So what you have in the "resolve" function is:
var cn:Vec2D = w.normal;
var dv:Vec2D = p.v;
var impulse:Number = cn.dot( dv.times( -2 ) ) / cn.dot( cn.times( 1 / p.mass ) );
p.v.plusEquals(...
-
That's a useful formula, it does help, but it doesn't explain how your 6 lines of coding works.
Sorry I'm not understanding; I shouldn't expect you to explain it all, I'm sure I would be able to get...
-
WAIT A SECOND! Are you using the dot product to calculate where it would be if it collided between frames?
|
Click Here to Expand Forum to Full Width
|