Hi!! I’m quite new with the BGE…what I’ve done is thank to this forum…now I’m trying to figure out how to apply the Shrinkwrap constraint in BGE.
I make a little example to explain me better. issue.blend (990 KB)
My target is move the ball with the mouse but along the bended wall.
Now the constraint is working outside the game (you can try moving the ball), but when game begin only mouse script drive the ball.
I’m open to solve this target in other ways, but this constraint seems be created for that target
That is because modifiers do not work inside the BGE, there are a few exceptions and the UPBGE guys are working on applying modifiers at game start, but something like shrinkwrap would not work as intended, as it would only take into account the first frame(my guess)…
Bottom line do not count on modifiers to work in the BGE....sorry.
@jolo GREAT WORKAROUND!!! Done exactly what I was looking for! Thank you very much.
If I understood well your script, is better if I update the Blue Sphere position, before update the Gray one, right?
not exactly, if you put 2 constraints on the same object :
if the first constraint say “go right”
and the other constraint say “go left” there is a conflict.
The blue sphere act as a sensor : he send a ray to find object with property “good_prop”
when he find such object we know the impact position of the ray on this object.