# Vector Addition? (AS3 Physics)

**URL:** <https://forum.kirupa.com/t/vector-addition-as3-physics/311127>\
**Category:** flash\
**Created:** [June 28, 2010, 4:47pm UTC](https://forum.kirupa.com/t/vector-addition-as3-physics/311127 "2010-06-28T16:47:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilikedragon](https://avatars.discourse-cdn.com/v4/letter/i/6bbea6/32.png) [@ilikedragon](https://forum.kirupa.com/u/ilikedragon)\
**Post date:** [June 28, 2010, 4:47pm UTC](https://forum.kirupa.com/t/vector-addition-as3-physics/311127/1 "2010-06-28T16:47:15Z")

</div>

Hey guys I have a simple (I hope) problem for AS3.

Say for example I have a ball and I would like to move it towards a specific angle and a specific magnitude I would use something like:

```auto
var myMag:int = 2
var myAngle:int = 10

var speedx:int =Math.sin(myAngle*(Math.PI/180))*2*myMag;
var speedy:int = Math.cos((myAngle*(Math.PI/180))*2*-1)*myMag;

x+=speedx*speed;
y+=speedy*speed;

```

Now if I wanted to change this force, for example, add a force to it, say, with magnitude 0.5 and angle 20, how would I do that?  
Thanks!
