Bouncing
-
- Posts: 2
- Joined: Fri Feb 05, 2010 9:22 am
- Contact:
Bouncing
Hi, I’m trying create ball in Windows with reflective borders. With infinite movement. How is the best practice in chipmunk?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Bouncing
If you want things to have a perfect bounce, you need to set the shape.e (elasticity) of all your shapes to 1.0 and the shape.u (friction) of them to 0.0.
Take a look at how the Bounce demo does it: http://code.google.com/p/chipmunk-physi ... o/Bounce.c
Take a look at how the Bounce demo does it: http://code.google.com/p/chipmunk-physi ... o/Bounce.c
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Fri Feb 05, 2010 9:22 am
- Contact:
Re: Bouncing
And how is possible move with items without gravitation?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Bouncing
You can apply forces to the the cpBody objects. You can also set their velocity directly if you just want to start them off moving in a certain direction.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 29 guests