1. A method of detecting complex linear and rotational movements based on data obtained from a gyroscope sensor and an accelerometer sensor in a portable device by using both linear and artificial intelligence computer programs that are based on sampling data for a period of time and operates on the sampling data for a period of time and operates on the sampling data to perform a desired action in an application or game, wherein the desire action is configured to be a movement or hit detection for an object in the virtual space environment, the method comprising: data sampling of accelerometer and gyroscope sensor data in the mobile device with a variable sampling rate and a time frame and storing the data sampling in a defined set for use by the application or game; using a linear calculation method to detect peak or valley values of linear motions to detect start and end of movement in any axis without a need to detect an actual position of the mobile device in a real world space; using a fuzzy logic method to detect movements and hit motions based on a set of predefined rules that vary depending on the type and scope of the application or game; using the data sampling as a whole and filtering noise data out of the data sampling that affects the accuracy of the detection that the linear calculation method initially configured as relevant; using neural network algorithms that operate on the sampling data and perform a similar detection of motion and hit detection as the fuzzy logic method with a difference being that the neural network algorithms is based on multiple user configurations and testing in both consumer and quality control sides; providing a set of parameters for the neural networks in accordance with an age group and application specifications to avoid overlap and optimize performance; modifying the set of parameters based on feedback from the application or game or based on feedback from a performance analysis on the application or lame; and using head tracking algorithms defined on portable devices that contain a front facing camera to move virtual objects in the virtual space environment and to use the changes in position over time to calculate forces and speed to be applied to game objects in the virtual space environment such as hit detection and movement.