|
Post by Cyance on Dec 31, 2015 15:09:43 GMT
Hi there,
got an issue on code.
void Update () { if (Input.GetButton("Fire1") && Time.time > nextFire) { nextFire = Time.time + fireRate; Instantiate(shot, shotSpawn.position, shotSpawn.rotation); --> this is working and can shoot from any direction with first person character
// PoolBoss.SpawnOutsidePool(shot.transform, shotSpawn.position, shot.transform.rotation); }
if i am using PoolBoss.SpawnOutsidePool(shot.transform, shotSpawn.position, shot.transform.rotation); it will only shoot in the Z direction
And i think i need to use this code so it will despawn my projectile / bullet.
Hope someone can help me out. Thanks
Kind regards
Cyance
|
|
|
Post by DarkTonic Dev on Dec 31, 2015 17:02:42 GMT
That should work the same as Instantiate. If you will send me a project that reproduces the bug I can take a look. Please read the big reporting rules thread that is stickied here.
First, try changing the rotation parameter you are passing to shot.rotation or Quaternion.identity and see if those work better.
|
|