- #1
sftrabbit
- 12
- 0
Erm... "Sag" physics?
Hi,
I'm trying to program a little 2D game to test some physics out.
What I want is a ground formed from a set of co-ordinates, with lines joining point to point to make the ground. Each point is separated 5 pixels apart.
Now, when the player object sits upon this line, I want the line to sag down. Like a cushion. I want it to compress inwards.
... for example. Where the player is at the bottom of the ditch.
Is there an article (or maybe you wouldn't mind doing it) that could help me with being able to calculate the position of all the points of the ground to give the illusion that the ground is bending beneath the player?
Oh, it'd be really nice if you put it in high school/secondary school terms. I'm not too familiar with extensive Physics and Mathematics vocabulary.
Any idea?
Thanks a bunch.
Hi,
I'm trying to program a little 2D game to test some physics out.
What I want is a ground formed from a set of co-ordinates, with lines joining point to point to make the ground. Each point is separated 5 pixels apart.
Code:
_______________________________________
Now, when the player object sits upon this line, I want the line to sag down. Like a cushion. I want it to compress inwards.
Code:
____________ _____________
''. -''
'-,_,-'
... for example. Where the player is at the bottom of the ditch.
Is there an article (or maybe you wouldn't mind doing it) that could help me with being able to calculate the position of all the points of the ground to give the illusion that the ground is bending beneath the player?
Oh, it'd be really nice if you put it in high school/secondary school terms. I'm not too familiar with extensive Physics and Mathematics vocabulary.
Any idea?
Thanks a bunch.