Hey people,
I spent 12 hours yesterday writing down the manual and looking up terms and things like that.
Anyway i have some questions regarding the engines usage.
How can i control a group of objects? For example, i created 5 circle bodys and connected them with distance joints to give me the shape of a space ship with suspension. When i apply an impulse to the centre particle of this structure, it takes flight which is good news.
However, i have no idea how to work with rotations. If you think of lunar lander or asteroids, you can control the rotation of the craft and then pressing "thrust" will thrust your ship in the direction its facing. Well this is killing me in both box2d and previously APE.
It would seem logical that is the user presses right or left, i could rotate SOMETHING by x radians. When the user presses up, i could get the rotation of SOMETHING and try to apply impulse alone the ships rotation.
As you can see, even if i am on the right track, i dont see how SOMETHING can be anything other than the structure as a whole and this is what is confusing me. Is there a better approach to this problem? I understand i could create 5 shapes instead and add them to a single body and then control that body but then i wouldnt be able to connect the shapes together using joints to create suspension. Id have a rigid shape shaped like a spacecraft?
What i would do in APE would be to extend the Group or Composite classes to group particles together and i cant seem to break out of this mindset.
Any advice would be great.
Thanks 😀
(2.0.1)
I spent 12 hours yesterday writing down the manual and looking up terms and things like that.
Anyway i have some questions regarding the engines usage.
How can i control a group of objects? For example, i created 5 circle bodys and connected them with distance joints to give me the shape of a space ship with suspension. When i apply an impulse to the centre particle of this structure, it takes flight which is good news.
However, i have no idea how to work with rotations. If you think of lunar lander or asteroids, you can control the rotation of the craft and then pressing "thrust" will thrust your ship in the direction its facing. Well this is killing me in both box2d and previously APE.
It would seem logical that is the user presses right or left, i could rotate SOMETHING by x radians. When the user presses up, i could get the rotation of SOMETHING and try to apply impulse alone the ships rotation.
As you can see, even if i am on the right track, i dont see how SOMETHING can be anything other than the structure as a whole and this is what is confusing me. Is there a better approach to this problem? I understand i could create 5 shapes instead and add them to a single body and then control that body but then i wouldnt be able to connect the shapes together using joints to create suspension. Id have a rigid shape shaped like a spacecraft?
What i would do in APE would be to extend the Group or Composite classes to group particles together and i cant seem to break out of this mindset.
Any advice would be great.
Thanks 😀
(2.0.1)