Okay so I am trying to find the distance from one model to another to detect if a door is open. I found the following method;
Simba Code:
function glModel.distanceFrom(funcModel:glModel):extended;overload;
begin result:=sqrt(pow(self.x-funcModel.x,2)+pow(self.y-funcModel.y,2));end;
Issue is when I try to put it into play I get errors.
Simba Code:
writeln(ogl.getModels(2524031219)[0].distanceFrom(WHEEL_MODEL_ID));
Error: Don't know which overloaded method to call with params (UInt32) at line 353
Compiling failed.
I've mixed and matched and tried everything that I've thought of and can't get it to work. Has anyone done this successfully and have an example I could look at or suggestions on things to try?