POLALA.COM welcome to my space |
Jerky Jumping | | Published by: mike 2010-03-19 |
| | Adobe Premiere Pro: Preview very jerky:: Jan 2, 2007 >the imported film sequenses without jumping over frames or jerk around with the Re: Preview is still very jerky by Lightwaver at Jan. http://forums.digitalmedianet.com/cgi-bin/displaywwugpost.fcgi?forum=adobe_premiere&post=070002204107.htmHOME | I'm currently in the middle of a game project and came across a problem. Whenever I jump in the game(please try to understand me), the character jumps normally until he hits the floor. When that happens (at the time, he is obviously lower than the floor), he jerks upward to the exact postition of the floor. I know why this happens (the computer checks if his y postion is LOWER than the floor), but I don't know how to fix it. Please help! Here is the code:
if (pc._y
pc._y += yvel;
}
if (pc._y>floor) {
pc._y = floor;
yvel = 15;
jumping = false;
}
if (jumping == true) {
pc._y -= yvel;
yvel -= 2;
}
if (Key.isDown(Key.UP) && !jumping) {
jumping = true;
}
what i would do is change the operator < to <=
if (pc._y<=floor && !jumping) {
pc._y += yvel;
}
if (pc._y>floor) {
pc._y = floor;
yvel = 15;
jumping = false;
}
if (jumping == true) {
pc._y -= yvel; System dynamics: modeling, analysis, simulation, design - Google Books Result:: href=http://books.google.com/books?id=yssgBnadk5kC&pg=RA2-PA320&lpg=RA2-PA320&dq=Jerky+Jumping&source=bl&ots=8N0pvuxYAW&sig=w7ffNm4Ke2TcyHuvdOcpFNa9TiM&hl=en&ei=EjsMSpS5DYyktgOQm8iNAw&sa=X&oi=book_result&ct=result&resnum=63 class=l onmousedown=return clk(this.href,,,res,74,)>System dynamics: modeling, analysis, simulation, design - Google Books Resultby Ernest O. Doebelin - 1998 - Technology & Engineering - 755 pagesThe amplifier output is extremely "jerky," jumping back and forth between +30 volts and -30 volts. However, if we apply this voltage to 10 B 6 4 2 I ° -2 -4 http://books.google.com/books?id=yssgBnadk5kC&pg=RA2-PA320&lpg=RA2-PA320&dq=Jerky+Jumping&source=bl&ots=8N0pvuxYAW&sig=w7ffNm4Ke2TcyHuvdOcpFNa9TiM&hl=en&ei=EjsMSpS5DYyktgOQm8iNAw&sa=X&oi=book_result&ct=result&resnum=63HOME | Jerky Focus when "IS" enabled - ClubSNAP Photography Forums:: 10 posts - 7 authors - Last post: Dec 10, 2007Now I see what you mean by jerky focus The phenomenon you see Forum Jump. User Control Panel, Private Messages, Subscriptions http://www.clubsnap.com/forums/showthread.php?t=333390HOME |
yvel -= 2;
}
if (Key.isDown(Key.UP) && !jumping) {
jumping = true;
}
let me know if it helps :!
if (pc._y>floor) {
pc._y = floor;
yvel = 15;
jumping = false;
}
Here it looks like your trying to stop the jumping... but why would the movie clip need a velocity if jumping is false.....
I could be wrong but its worth a shot
if (pc._y>floor) {
pc._y = floor;
yvel = 0;
jumping = false;
}
hey! thanx alot!
thanx :D
Ahhhh nicley spotted!
That won't work... because the code sets his y postion straight back to "floor." And if you were checking if he was equal with the floor, he would not be able to jump. :( Sen! I need you!
Hoi
this solves your prob
if (pc._y
pc._y += yvel;
}
if (jumping == true) {
pc._y -= yvel;
yvel -= 2;
}
// moved the if() down
if (pc._y>floor) {
pc._y = floor;
yvel = 15;
jumping = false;
}
if (Key.isDown(Key.UP) && !jumping) {
jumping = true;
}
flash reads up to down :)
a good tip when trying solve prob's like this is to look at the code and do very thing step by step in you mind. And when testing thing you should all ways have it after a change has been made :D
Eidt: fixing typ0 :blush:
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|
#If you have any other info about this subject , Please add it free.# | |
|