george++,
Quote: "Is it possible to create a prismatic joint but restrict the rotation of the whole body?"
+
Quote: "The prismatic joint allows the sprites to only move along a given axis relative to each other."
= the angle between the 2 sprites should
always = atanfull(x2# - x1#, y2# - y1#). you can't get any more restrictive than that
otherwise, i think you're misunderstanding the parameters of the prismatic joint:
IE, i don't understand your use of GetSpriteXByOffset(spr2), GetSpriteYByOffset(spr2) for
vx, vy where those params represent which
axes (relative to the angle between the 2 sprites) that the sprites can move along (x &/or y).
so, 0 or 1 for each parameter/axis (<< it might not be as simple as that. i haven't explored other values).
add again:
(it's the vector. i get it now...)
you're doing similar with the
x, y params using GetSpriteXByOffset(spr1), GetSpriteYByOffset(spr1) as
the joint's anchor point (vs, perhaps, the center-point between the 2 sprites that i might have expected?) .
i just realized, you want spr2 to rotate around spr1? (where you have set x, y properly, if that's the case)
so, questions:
do you want the joint to be centered between the 2 sprites?
do you want them to stay within a certain range of eachother?
do you want the joint/center-point to be able to rotate (and be limited?) ?
do you want the sprites to be able to rotate independently from each other (and be limited) ?
the short version: can you better describe your desired effect?