[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: Keeping a sprite on screen with rect.clamp



I want to calculate a straight path of points between two points and
each frame do:

sprite.x, sprite.y = sprite.path[step]
step++

And have the sprite move along that line.  I've lost all basic math
skills, and don't want to spend an hour debugging such a simple thing.

Mark

On Tue, Aug 17, 2010 at 9:41 AM, Luke Paireepinart
<rabidpoobear@xxxxxxxxx> wrote:
> Can you be more specific about what you mean? Are you trying to interpolated points between two endpoints or what?
>
> Sent from my iPhone
>
> On Aug 16, 2010, at 8:13 PM, Mark Reed <markreed99@xxxxxxxxx> wrote:
>
>> Anyone have a function for calculating all the points on a line to be
>> used for sprite movement?
>>
>> Mark
>