Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RadWayne

Pages: [1]
1
Support / How to instantiate and AddForce to a Sprite?
« on: May 27, 2013, 05:25:47 pm »
I'm having trouble effecting Sprites via C# scripts.I have something like this:

Code: [Select]
public transform point;
public tk2dSprite thing;

void Update(){
     tk2dsprite.Instantiate(thing,point.position,point.rotation);
     // Wasn't sure where to go from here


   //Also tried this from Unity's tutorials
   Rigidbody projectile;
   projectile = tk2dsprite.Instantiate(thing,point.position,point.rotation) as Rigidbody;
   projectile.AddForce(point.forward * 1000);
}

Not really sure what I'm doing.  :P

Pages: [1]