You don’t need the angle per say. You need the unit direction vector. You can get this by taking the target point, subtracting the object’s starting point and then normalising result. This will give a unit vector.
So here’s the code for it for PlayCanvas: (code reference: http://developer.playcanvas.com/en/api/pc.Vec3.html)
var direction = new pc.Vec3();
direction.sub2(targetPosition, startPosition);
direction.normalize();
To calculate the distance is standard trigonometry but we do have a built in function in the pc.Vec3 called length. So to work out the distance is almost the same steps.
var difference = new pc.Vec3();
difference.sub2(targetPosition, startPosition);
var distance = difference.length();
You can also calculate both in one go now:
var direction = new pc.Vec3();
direction.sub2(targetPosition, startPosition);
var distance = direction.length();
direction.normalize();
Then you can move the object by using translate like so:
var move = direction.clone();
move.scale(speed * dt);
this.entity.translate(move);