Search Unity

Bullets spawn set velocity, goes no where on vita, works fine on PC etc...

Discussion in 'PSM' started by codejoy, Dec 17, 2014.

  1. codejoy

    codejoy

    Joined:
    Aug 17, 2012
    Posts:
    204
    I have a bullet that is spawned, that bullet prefab has a startup script as such:


    void Start () {
    rigidbody2D.velocity = velocity * this.transform.localScale.x;
    }

    So I set the velocity on start to 12. I am not sure why this isnt working...the bullet just sits there. It works on PC, and even the OUYA. I cannot figure out why this doesn't work on Vita.

    I also just to check my sanity replaced the

    rigidbody2D.velocity = new Vector2(12,0);

    and incase it was a scaling issue I tried this also:
    rigidbody2D.velocity = new Vector2(1222,0);

    I even thought maybe something wonky with object reference so i tried it with a this

    this.rigidbody2D.velocity = new Vector2(12,0);

    None of this works, and I am just totally lost as to why my bullets are not flying away... where it does it on all other systems. Here they spawn just stay stationary (the even animate). The mass of the rigidbody2d on the bullet is .00001 as well.
     
  2. madgreg

    madgreg

    Joined:
    Aug 29, 2013
    Posts:
    35