0
Searching answer

Shoot Sphere

Aeon FitzGerald 10 months ago in Shooter updated by Marti (Lead Developer) 8 months ago 5

"Shooting Projectile Type is the easiest to set up. It instantiates a prefab, defined by Prefab Projectile, where the muzzle is and moves it forward."

Im trying to launch a simple sphere from a muzzle, once shot it either;  Stays still in space or droops down from muzzle (when rigid body applied)

i want it to shoot forward, what am i doing wrong?

Unity version:
2019.2
Game Creator version:
1.0.7
+1
Answered

You can shoot a projectile by two means: Either using physics or manually translating the object. The first option is the easiest: Add a Rigidbody to your projectile object.

Then, in your Ammo asset, increase the Force property until your shoots are fired with the desired intensity. You can tweak these values at runtime and they will be automatically saved when exiting.

Cheers!

Which is the force property? Distance? 

Oh i see, it only works in trajectory mode. I wanted to use cross hair to aim while shooting a sphere from the muzzle. 

Under review

I don't have the Shooter module at hand at the moment, so I'm opening a ticket. But I think the Push Force should be available also for all raycast/trajectorycast shooting modes. Maybe that's a bug.

I'll look into it!

Searching answer

Hey Aeon;

I was looking at this issue and the Push Force is only for moving objects when the raycast/trajectorycast hits an object. When you shoot a projectile, you will normally use a Rigidbody, which will influence other game objects hit by using Unity's physics engine. That's why there's no Push Force property exposed when using the shooting mode as "Projectile".


If you still think this is an error, could you further elaborate what you're trying to do with some screenshots? Thanks and cheers!