Rotating individual shapes of a body?
Posted: Mon Aug 04, 2008 2:38 pm
At first I would like to thank anybody who contributed to chipmunk. It is a wonderful library and finally allowed me to get rid of my own (buggy) collision implementation. THANKS!
But I still have a couple of open questions ... Or better: a problem where I cant see any "chipmunk" way of solving it The scenario is as follows:
Firstoff: this is a topdown game;) Imagine some kind of Bots (similar to Tanks / Battlemechs, whatever you like) which consist of a basic shape. We refer to this as chassis in our game. Then there are all kinds of what we call modules, which can be attached to the chassis. These modules eg represent weapons, sensors, engines ... all kind of fancy stuff you could attach to a tank-like thing The problem now is, that each of these modules need to be rotated separately. At least if we want to allow people to turn a turret or similar stuff And these have been our thoughts so far:
1) Simply let every module track its shapes attached to tank and turn them around if needed. But this does not seem to be possible?
2) Assign an own body to every module and link these body's to the chassis via joints. But sadly there does not seem to be any joint, that is completely inflexible. We need to achieve a similar behavior, as if the body's were attached like shapes to a main body, but can be rotated.
I hope the problem is clear and I have simply overlooked something Any help is gladly appreciated!
But I still have a couple of open questions ... Or better: a problem where I cant see any "chipmunk" way of solving it The scenario is as follows:
Firstoff: this is a topdown game;) Imagine some kind of Bots (similar to Tanks / Battlemechs, whatever you like) which consist of a basic shape. We refer to this as chassis in our game. Then there are all kinds of what we call modules, which can be attached to the chassis. These modules eg represent weapons, sensors, engines ... all kind of fancy stuff you could attach to a tank-like thing The problem now is, that each of these modules need to be rotated separately. At least if we want to allow people to turn a turret or similar stuff And these have been our thoughts so far:
1) Simply let every module track its shapes attached to tank and turn them around if needed. But this does not seem to be possible?
2) Assign an own body to every module and link these body's to the chassis via joints. But sadly there does not seem to be any joint, that is completely inflexible. We need to achieve a similar behavior, as if the body's were attached like shapes to a main body, but can be rotated.
I hope the problem is clear and I have simply overlooked something Any help is gladly appreciated!