And using EntityParent and PositionEntity, etc. EVERY FRAME could be very slow.
I may not understand you, but I don't see why you need to perform those checks every frame. Just perform them the first time you hit spacebar, like this:If KeyHit(57) and cam_mode = 1 cam_mode = 2 EntityParent camera, car\entity PositionEntity camera, EntityX(car\entity), EntityY(car\entity)+30, EntityZ(car\entity)-10 RotateEntity camera, EntityPitch(car\entity)+45, EntityYaw(car\entity), EntityPitch(car\entity) EndIf
And then take these lines:
EntityParent camera, car\entity PositionEntity camera, EntityX(car\entity), EntityY(car\entity)+30, EntityZ(car\entity)-10 RotateEntity camera, EntityPitch(car\entity)+45, EntityYaw(car\entity), EntityPitch(car\entity)out of the bit of code you posted at the top of this thread.