Here is the original code from my sketch:
ofPoint dir = mouseBall.position - myCollectionOfBalls[i].position; float d = dir.length(); dir.getNormalized(); d.ofClamp(d, 5, 100); // this is the line with warning. float force = -1 * 100 / (d * d); ofPoint final = dir * force;
I can’t run the sketch, and it warns: “”
error: member reference base type 'float' is not a structure or union d.ofClamp(d, 5, 100); ~^~~~~~~~
Anyone has any idea?