Page 1 of 1

gravity physic

PostPosted: Thu Jun 08, 2006 8:49 pm
by Game A Gogo
I hate it, when you put some gravity
Code: Select all
yvelocity+=0.4;
if(yvelocity==4)
{
yvelocity=4;
}


and a physical respond,

There is alway tiny movent (varries to 0.0 to 0.9 ) of the x or y position of the actor, so when you put a colision tingy it is always repeated even if its set to not repeat, if you could reselout that, it would be great!!

and could also remove so script for some peoples.

Re: gravity physic

PostPosted: Sun Jul 02, 2006 11:46 am
by ondy1985
Game a Gogo wrote:gravity
Code: Select all
yvelocity+=0.4;
if(yvelocity==4)
{
yvelocity=4;
}



I don't know wheter it's the cause of your problem, but I don't see anything good in using the
Code: Select all
if(yvelocity==4)
. That means, each time, the yvelocity is equal to 4, it is set to 4. Then in the next iteration, the yvelocity is increased again... and again...and again. So the if statement does absolutely nothing.
You should write
Code: Select all
if(yvelocity>=4)

PostPosted: Sun Jul 02, 2006 4:38 pm
by Game A Gogo
thx, ill try that!

PostPosted: Sun Jul 02, 2006 4:45 pm
by Game A Gogo
nothing changed, it gos 0.0 to 0.4 then 0.8 and gos again to 0.0 ect.