I’m studying the Moving Platform script within the “Platform Controller” script in the Lerpz 2D tutorial so that I can apply their moving platform code to my own (3D) game. But while reading through it, I’ve come across this code which seems broken:
activePlatform = null;
//some code, none of which references activePlatform
//...
if (activePlatform != null) {
activeGlobalPlatformPoint = transform.position;
activeLocalPlatformPoint = activePlatform.InverseTransformPoint (transform.position);
}
Clearly, it is impossible to enter into the if statement.
Lerpz DOES work correctly with the platform, but I don’t like/want to copy and paste in code that doesn’t do anything (so as to avoid looking like an idiot).
If anyone has played around with this moving platform code, some explanations would be helpful, as there isn’t much documentation about what exactly TransformPoint() and InverseTransformPoint() do (the docs say “transforms the point” or something).
Thanks guys.