Cannon Help

Hello, i’ve just started using blender am i have encountered some problems that i don’t know how to solve. Any help would be received gratefully. I made a cannon that is supposed to shoot a ball directly out of the cannon with the spacebar. You can also turn and tilt the cannon with the arrow keys. When i turn the cannon around though the ball comes out at an odd agle, why is this? Also for some reaeson when i save as an exe the floor is black.

http://putstuff.putfile.com/36405/3714228

Thankyou for any help.

try doing a Ctrl+A on your projectile. Any other meshes that are involved as well maybe. also, if you go to the superwu3D ( the game ) thread, on one of the last pages, there are a couple of files with canons and there’s also a canon in the game demo files for the latest version ( 2.43RC1 ). I don’t know about the floor, but try doin Ctrl+N in edit mode for ‘recalculate normals outside’.

Both of those didn’t seem to do anything. Thanks anyway. Can someone take a look at the file for me?

Remove any object scaling from the projectile. If you want to have it scaled edit the mesh directly.
If this does not help then remove the object scaling from the cannon.
I can’t remember which one. Object scaling is usually not a good idea. There are some sideeffects as you see.

I hope it helps

Very simple: your empty is not parallel to the cannon.

hmm not sure but is int there a way to make the ball copy the rotation of the cannon?

Well just set the rotation logic up like the cannon. So for instance if you press the left button both of them rotate.

For your ground and exe problem it may be that you didn’t pack your textures. Go up to file and select “Pack Textures” before making the exe.

I have made the empty a parent of the cannon. I think the reason that it doesn’t fire straight is because whatever gives the cannon its local axis is not positioned correctly but i don’t know what or how to change. How would i make the emtpy parralel to the cannon? How would i remove the object scaling?

Rotate the empty so that its x-axis aligns with the cannon. You have the “Move object centers only” button pressed (it is in center of the 3d view header, three dots and two-headed arrow), so you must uncheck it before rotating the empty. You must also change those velocities in empty’s add object actuator so that it gives just x velocity (about 15 seems fine). I tested it and it works perfectly.

Thanks a lot. That fixed it perfectly. I must have acidently pressed that button. Thanks again.