Greeting everyone! 😛
i have the following problem:
i'm trying to make a top-down car game. In my index file i have a parent element named window and its child element named game(it's a canvas element). both elements have the same width but the child element height is twise as big.
my problem arises when i try to scroll down the child element("#game") while the car is moving up.
i tryied using without success...
i guess it have to be more complecated than that...
can anyone help me out please. i hope that i described the problem clearly enough
p.s. that's how i tried it.
i have the following problem:
i'm trying to make a top-down car game. In my index file i have a parent element named window and its child element named game(it's a canvas element). both elements have the same width but the child element height is twise as big.
my problem arises when i try to scroll down the child element("#game") while the car is moving up.
i tryied using
Code: Select all
$("#game").css("top",top+95);i guess it have to be more complecated than that...
can anyone help me out please. i hope that i described the problem clearly enough
p.s. that's how i tried it.
Code: Select all
$(document).keydown(function(e){
switch(e.keyCode){
case 88://88-x key
var force = new b2Vec2(0, -100000000);
test1_Game.car.ApplyForce(force, test1_Game.car.GetCenterPosition());
$("#game").css("top",top+95);
break;
}