I have made 2 planes for limiting the player movement up and down.
I got stuck with plane 2 (the bottom one). As you can see in the editor (picture 1) its Y Translation value is 39 but running ingame (picture 2) it is 448 (I used label1.caption := floattostr(Plane2.Translation.Y) to show its value.
Hm, this should not happen of course. I mean value of Plane2.Translation.Y at runtime (in your game) should be equal to the value at design time.
This is assuming of course that you don’t modify it from code, and don’t use there physics which would modify it automatically.
Please submit a simple testcase to reproduce the problem, I’ll investigate.
Again I’d have to see the context to tell more. The condition looks fine. But I don’t know how do you move character, and what do you do in StandFront.
Note that in general, I’d advise to use WorldBoundingBox, so that it is obvious that the things you compare are transformed in the same way (the mere BoundingBox doesn’t account for transformations of parent TCastleTransform). In this case, this should not be a problem, as I see both PlayerTransform and Plane2 are in the same space. But in general it’s better to use PlayerTransform.WorldBoundingBox and Plane2.WorldBoundingBox.
The initial check for PlayerTransform.BoundingBox.RectangleXY.Collides(Plane2.BoundingBox.RectangleXY) also looks suspicious. Why do you need this? Isn’t check for if PlayerTransform.BoundingBox.Min.Y < Plane2.Translation.Y enough?
For this, please also submit a project to reproduce (not your full project, only a minimal cut-down version to demonstrate your problem). Then we can help more