[Newbie]: how to use images instead of circles

Official forum for the Chipmunk2D Physics Library.
Post Reply
beatpanic
Posts: 3
Joined: Wed Oct 07, 2009 9:30 am
Contact:

[Newbie]: how to use images instead of circles

Post by beatpanic »

hi, just watched videos, fantastic things and stuff, but I'm wondering how to display for example a nice ball (image) attached to a circle :)

all with pygame
zaerl
Posts: 40
Joined: Fri Aug 28, 2009 8:36 am
Contact:

Re: [Newbie]: how to use images instead of circles

Post by zaerl »

Create a sprite and apply roto-translation 2D transformation matrices according to the bodies position/angle.
beatpanic
Posts: 3
Joined: Wed Oct 07, 2009 9:30 am
Contact:

Re: [Newbie]: how to use images instead of circles

Post by beatpanic »

zaerl wrote:Create a sprite and apply roto-translation 2D transformation matrices according to the bodies position/angle.
is there some game or example in python or even in c/c++ that can explain to me how to do it? thanks
zaerl
Posts: 40
Joined: Fri Aug 28, 2009 8:36 am
Contact:

Re: [Newbie]: how to use images instead of circles

Post by zaerl »

You can find some good sprite tutorials on the official site. You can grab position of chipmunk bodies using cpBodyGetPos and angle with cpBodyGetAngle.
beatpanic
Posts: 3
Joined: Wed Oct 07, 2009 9:30 am
Contact:

Re: [Newbie]: how to use images instead of circles

Post by beatpanic »

zaerl wrote:You can find some good sprite tutorials on the official site. You can grab position of chipmunk bodies using cpBodyGetPos and angle with cpBodyGetAngle.
ok, I'll study. thanks
I was in hurry, but I'll built block by block slowly :)
Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests