Usually, when I want to fire a bullet, I just add it into the scene and then use the .applyForce command to fire it. However, to use .applyForce, the object has to be dynamic, which causes it to be affected by gravity. I’m looking for a way to fire a bullet where it will fly perfectly straight without being affected by gravity at all.
The gravity is set at the scene tab. The default is 9.80.
@DarkFire7: Good observation.
If you only have one sensor AND and OR act the same. So it does not matter which one to use. I just want to show there is more than AND ;).
In some situations I prefer the OR as it allows to easily add “test” events to see if an Actuator does what you want. (e.g. triggering an action via keyboard sensor). The OR does not force you to un-connect the original sensor as the AND controller does.
The AND is the “traditional” controller as it was the default controller in pre-2.5 (the one after clicking “add controller”).
So, let me see if I understand the difference between AND and OR controllers: (I’m getting this off the user manual, so I just want to make sure my understanding is correct) for AND, all of the sensors attached to it have to be positive in order for it to send a positive signal. For OR, any of the sensors attached can be positive in order for it to send a positive signal. Is this correct?
I think I am just going to use Monster’s solution for disabling the gravity. Thank you though for the input.
No, because after clearing the velocity you still get the gravity applied.
This let you object slowly move to the ground. The falling speed does not sum up to form the known acceleration curve. It falls with a constant speed. The speed is the fall speed after 1 frame = 1s/60.
I think this side effect let some people think the gravity is higher in bullet than the configured 9.80.