i just wanted to ask can someone give me the exact code for this...i have gmnewton and i want to make my object move in the direction im pushing it heres something that kind of explains what im trying to say:
By 1800askgeek: To the extend of my knowledge, there are two (simple) ways to do this: if your game is effectively 2d with 3d graphics (like Mark Overmars's example) you can use GM's collision detection, which is essentially a bounding box. If you have more 3d movements, like jumping and falling, you will probably need to move your bounding boxes into 3d space.
Consider a crate placed in the middle of a room. It has length, width, and height, and you need to check the moving object's location relative to the 3d-box. Extending this idea to something like a sphere, you can get a good approximation of the shape of the sphere by taking the diameter of sphere and using that as the length, width, and height of the bounding-cube. Make sense?
Another way you could do it is precise-collision checking using polygons. Considering the surface of each polygon that is in the checking region, and then seeing if another polygon (the moving object) intersects that polygon. Doing this manually would require some expensive math, so, unless someone's got another method that I don't know about, you'll probably want to stick with bounding-box/cubes.
One work around would be to break a complex object into a series of 3d bounding-boxes, which would let you make something arbitrarily complex.
now all i want is just pushing not falling on it or anything just right, left, forward and backwards thats all i want and if someone could give me the exact code to get the box to like spin around if the way you push it is just right and pushing it away that would be awesome!











