i cant figure out how to make an object bounce
like samus in morphball
exactly like that actually :O_O:
anyone care to assist?
i cant figure out how to make an object bounce
like samus in morphball
exactly like that actually :O_O:
anyone care to assist?
If you could tell us what program are you using we could help, personally I know shit about any programming language, so I won’t be of much help xd
oh, right xD
i always do that
im using GM
It doesn’t matter what programming language you’re using. It’s the mechanics that matter.
I’d just say:
if colliding with ground
let vertspeed = -(vertspeed/2)
For instance.
it just keeps bouncing o.o;
edit*
if vspeed>0 and place_meeting(x,y+1,block){
vspeed=-(vspeed/2)}
well thats what i got
i need a check that kills the vspeed to nothing when it gets too low
but everything i try doesn’t work
suggestions?
Just put your “if vspeed < 0.5 {vspeed=0;}” in the if statement… I’m not absolutely sure of the syntax (I’m not a GM user, but like Timaster said, it’s the mechanics that matter), but here’s what I’m saying:
if vspeed>0 and place_meeting(x,y+1,block) {
if vspeed < 0.5 {
vspeed=0;
}
else {
vspeed=-(vspeed/2);
}
}
But you probably want to change that 2 to a 3 and the 0.5 to something larger so it won’t bounce as long.
What Mason said.
Definitely up the vspeed limit, though. .5 is REALLY slow =P