Hi guys!
So i'm trying to understand my free version of C2 now and obviously my first post on the forum is in "how do I?" section.
What I'm trying to do is the physics-affected character or an object which is composed of several other objects. Let's say its a robot that has it's torso, legs, arms and, well, head. For diversity purposes, they all must be switchable in-game, so drawing n variations of a robot is illogical - having only 2 variants of every of 4 parts makes 16 different robots.
So I made separate parts, gave them Physics, Platform and Pin behaviors (oh well, I forgot to say that it's in a 2d side-scroll platformer perspective), made events "at layout start -> disable collisions between all 4 sprites" and pinned them by the following scheme: body is pinned to legs while arm and head are pinned to different imagepoints of a body.
That worked great untill I start moving the legs - body is moving fine with legs, but I experience some 'lag' with arm - it's start to move slightly after the legs and body do and because of that arm is placed several pixels far from the imagepoint it was originally pinned while moving. I also tried Revolute joints, but can't make anything good.
So far the best thing I figured out is: make invisible 'player' sprite with imagepoins for pinning (or joint?) every part onto them and only that invisible 'player' sprite must have Platform and Physics behaviors. Or something like that.
So anyone who understands what I tried to tell here (I really did, I swear!) or have tried something similar and have any useful experience which would come handy for me - please give me advice or show me direction to follow. Is the thing I'm trying to do possible without having mad skills of coding? And what's the easiest and the most efficient way to achieve it?
And one more thing. I'm at my work right now so I can't attach a .capx file, if someone needs it for a better understanding of what I tried to make.
Thanks a lot and good luck in your creations.