Just like the title, how do you keep an object a set distance from a surface (using Python)? Is it a matter of setting a z distance (if so, how?).
I ask as I’m struggling a bit with a script that was very kindly written for me from a chap from Gameblender.org. It allows objects to loop the loop, but the script renders Fh material forces inoperable. Instead, the script emulates the material force field but since it uses liner forces the object will dig into the loop as it goes round.
The latter is the part I am struggling with (in the script it is the forceoffield variable). At the moment my Python is more ‘hello world’ and this goes right over my head. From what I understand the script needs a way to calculate the linear velocites of x and y but keep z constant (or so I think).
Can anyone help?
Here is the blend:
loop.blend (391 KB)