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

Re: [pygame] trajectory



You can define bullet speed in pixels per second.

You can use euclid (it works), but I instead suggest numpy. Which has a vector( numpy.array ), and is useful for other game related things.


Here's a stand-alone example, uses numpy for vector movement.

https://code.google.com/p/ninmonkey/source/browse/boilerplate/pygame/4.%20with%20numpy%20for%20array/boilerplate%20-%20pygame_with_numpy-2011_jake.py

On Wed, Jul 20, 2011 at 9:33 AM, Nathan BIAGINI <nathan.open@xxxxxxxxx> wrote:
There is a pygame object to create a 2d vector?


--
Jake