gravity physic

Ideas for Game Editor evolution.

gravity physic

Postby Game A Gogo » Thu Jun 08, 2006 8:49 pm

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.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: gravity physic

Postby ondy1985 » Sun Jul 02, 2006 11:46 am

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)
Image

Motto: "I never let my schooling interfere with my education" --- Mark Twain
User avatar
ondy1985
 
Posts: 99
Joined: Thu May 05, 2005 7:43 pm
Location: Slovakia
Score: 1 Give a positive score

Postby Game A Gogo » Sun Jul 02, 2006 4:38 pm

thx, ill try that!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Game A Gogo » Sun Jul 02, 2006 4:45 pm

nothing changed, it gos 0.0 to 0.4 then 0.8 and gos again to 0.0 ect.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron