Add Object Actuator - Bullets

Ok, I have a little “test” game.
Here’s the set up.
I have a simple flat-like cube for a floor
A cube with a camera parented to it and the gun parented to that.
An empty parented to the gun, just a little bit out of the barrel.
I have the empty to add the bullet and shoot it in the LOCAL (yes L is checked) Y axis.
It shoots perfectly fine when I aim in the starting position, but when I look left or right it starts shooting towards the Y Axis but left/right of it. The more I turn the farther away from the correct direction it shoots.
thanx for your help

It’ll be hard to find the answer without a blend or even pics. Try this: parent a small object, say a cube, to your empty, so that you will have some visual indication of what it’s doing. This way you’ll know if the empty itself is doing what you expect. You may also want to remove collision sensitivity from some of your objects, such as the gun. Hope this helps.

PS - You need to shorten your signature down to just two lines.

when i get home i’ll post one up

and i’m sure i’ll shorten my sig.

I am looking forward to this…

3 things I like in life… Blender , cheap beer, and my fat wife :slight_smile:

this happened to me aswell.
im now trying to use the ray technique but im finding it a bit hard

I’m new to the Game Engine so I hope what I did to fix this problem is correct and not just a fluke. For me what worked was, I gave my ship the add object actuator (not an empty parented to it or anything like that) and told it to add an empty that was created in a separate layer, which was a parent of my lasers. That was about it. Err…I think that made sense…

For some reason when I first tried making something shoot I had this weird network of empties all parented to separate things, it was crazy. Ends up all I needed was the one in my second layer.

Hope that helps…but seeing how you wrote that over a month ago I don’t know how useful it will be.

It often helps to remove any scaling from the parent objects.

This means no scaling on the empty, no scaling on the barrel, no scaling on anything were the barrel is parented to.

I hope it helps.

This is a huge problem that has been keeping me from completing a few projects. I really hope this gets fixed.
one thing that helped in my fps was to use an ipo for vertical tilt in my mouselook method instead of drot. but my other project wont allow for an ipo to be used. :spin:

RestInMyEyes and marvo, can you post a few sample .blend files showing your problems ( a very basic one to test against, and perhaps a more complex one that you are working on to show the problem in context )?

I did a quick fix locally regarding using a parented TrackTo and adding objects, but need to look deeper into why it worked - I can test to see if the same fix might work for your .blend files also.


sure heres a project in the early stages that perfectly illustrates the issue:
wasd to move
left mouse to shoot

as you can see, as you move the crosshair around the screen and the arrow tracks to it, the bullets wont always come out straight like they should. it also helps to select “show physics visualization” to see the bounds of the bullet change at the empty.

Like i said before this is a problem that i have always been running into lately. It doesnt have anything to do with track to because my other projects didnt use it and i had the same problem

I will upload a more simple example when i get home.