A computer readable storage medium having stored thereon a game program to be executed by a computer of a game apparatus, the game program being for moving an object in a virtual space based on posture/motion information obtained from predetermined detection means for detecting a posture or a motion of an input device operated by a user, the game program causing the computer to function as: posture/motion information obtaining means for obtaining posture/motion information detected by the detection means; posture calculation means for calculating the posture of the input device based on the posture/motion information; reference plane setting means for virtually setting a predetermined plane as a reference plane in an actual space at a predetermined timing based on the posture/motion information; angle calculation means for calculating an angle made by the posture of the input device and the reference plane; determination means for determining whether or not the angle made by the posture of the input device and the reference plane fulfills a predetermined condition; and processing means (S 17) for executing predetermined processing in accordance with the posture of the input device with respect to the reference plane, wherein the reference plane setting means sets the reference plane based on the posture of the input device obtained when the user operates the input device, when the determination means determines that the predetermined condition is fulfilled, the processing means executes predetermined processing, regarding the input device, three axes perpendicular to one another are defined, and the reference plane setting means: includes candidate plane calculation means (S41, S43) for calculating two planes usable for setting the reference plane, based on postures of the input device calculated by the posture calculation means along directions of predetermined two axes among the defined three axes, and sets the reference plane based on the two planes calculated by the candidate plane calculation means. posture/motion information obtaining means for obtaining posture/motion information detected by the detection means; posture calculation means for calculating the posture of the input device based on the posture/motion information; reference plane setting means for virtually setting a predetermined plane as a reference plane in an actual space at a predetermined timing based on the posture/motion information; angle calculation means for calculating an angle made by the posture of the input device and the reference plane; determination means for determining whether or not the angle made by the posture of the input device and the reference plane fulfills a predetermined condition; and processing means (S 17) for executing predetermined processing in accordance with the posture of the input device with respect to the reference plane, wherein the reference plane setting means sets the reference plane based on the posture of the input device obtained when the user operates the input device, when the determination means determines that the predetermined condition is fulfilled, the processing means executes predetermined processing, regarding the input device, three axes perpendicular to one another are defined, and the reference plane setting means: includes candidate plane calculation means (S41, S43) for calculating two planes usable for setting the reference plane, based on postures of the input device calculated by the posture calculation means along directions of predetermined two axes among the defined three axes, and sets the reference plane based on the two planes calculated by the candidate plane calculation means. includes candidate plane calculation means (S41, S43) for calculating two planes usable for setting the reference plane, based on postures of the input device calculated by the posture calculation means along directions of predetermined two axes among the defined three axes, and sets the reference plane based on the two planes calculated by the candidate plane calculation means.