Pymunk - Apply rotational force to shape

Official forum for the Chipmunk2D Physics Library.
Post Reply
Projet_Peip
Posts: 4
Joined: Thu Feb 20, 2014 5:00 am
Contact:

Pymunk - Apply rotational force to shape

Post by Projet_Peip »

Hi!

First of all, cool free physics engine, I like it so far and find it quite easy to handle.
I feel like this is a dumb question and has probably been asked by millions of noobs already, but I couldn't find anything about it anywhere.

I am currently working on a project that consists in studying the effects of ball shapes interacting in a tube that rotates. I can not make the tube rotate using pymunk but i have heard there is a possibility of applying a force on the balls that fall on my tube shape, that would simulate the rotational force.
However, being a noob, I can't seem to find the function that would allow me to apply that force. Can anybody help me ?
I've tried a couple things, like turning off friction, but nothing worked. I've tried the elasticity function but it doesn't work.

Any ideas?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Pymunk - Apply rotational force to shape

Post by slembcke »

Not really certain I understand your question. I would take "Rotational force" to mean torque normally, but I'm not so sure from reading the rest of the description.

What prevents you from making the tube rotate?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Projet_Peip
Posts: 4
Joined: Thu Feb 20, 2014 5:00 am
Contact:

Re: Pymunk - Apply rotational force to shape

Post by Projet_Peip »

Hello, first things first, thank you for your answer.

We have created an empty circle using the Static polygon function. As said, this body is static, so we can not make it move. We have entered a function alowing us to drop balls where we want by a click of the mouse.

Since the circle is static, we would like to simulate a rotating circle (rotating around it's center). We thought it would be possible to make this circle apply a force to the balls when they colide.

Is this possible ? If so, how can we accomplish such a feature ?

Once again, thank you in advance for your answer(s).
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: Pymunk - Apply rotational force to shape

Post by viblo »

I dont think I fully understand your problem, why not just rotate the circle?
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests