recently i have been working on a little project most of which i don't want to discuss but i can say i have made this script
var p1x:Number = p1._x;
var p1y:Number = p1._y;
var p2x:Number = p2._x;
var p2y:Number = p2._y;
var diffy:Number = p2y-p1y;
var diffx:Number = p2x-p1x;
var angle:Number = Math.atan(diffy/diffx);
txt_txt.text = diffy+diffx;
line._rotation = (angle)/(Math.PI/180);
and
if (diffx+diffy>=-0.7) {
p1._x--;
line._x--;
p1._y++;
line._y++;
p2._x--;
p2._y++;
}
if (diffx+diffy<=-80.9) {
p1._x++;
line._x++;
p1._y--;
line._y--;
p2._x++;
p2._y--;
}
if (diffy<=-20) {
p1._y++;
p2._y++;
}
there is some more like hitest and movement but this is all that is important. Basically the script uses 2 points, p1 and p2 which are circles and the line is just a square. as the circles move up, down, left and right the angle between the circles is calculated and the line.angle is made to match. Because i don't want to take up too long here it is, if it goes upside down on a ramp like a bracket ) it jumps up on top of the ramp and on verticle sides one circle ( closest to the wall) jumps on top. any ideas why? if you need more info just ask thanks
[closed]
angle buggs
(5 posts) (5 voices)-
Posted 3 years ago #
-
No I can't help you.
Remember, easy mode saves lives.
Posted 2 years ago # -
YOU ARE SPAMMING! NO BUMPING WITH USELESS ANSWERS!
YOU SHALL DIE A PAINFUL DEATH IN... .... SOMEWHERE WHERE THE PAIN WILL CONTINUE!
This is a signature!Posted 2 years ago # -
Don't post just for the sake of posting. This member hasn't been around for months, and telling him you can't help won't help him.
Just got back on the internet after losing my access for a week. Read more on Random Discussion.Posted 2 years ago # -
Ok seriously liphttam1, don't bump old posts like these. Especially when you have nothing constructive to say on it.
Posted 2 years ago #
Topic Closed
This topic has been closed to new replies.
