You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to excaliburjs
Hi,
I find using actor acceleration and velocity quite useful. Only problem seems to be that I can't set vector momentum/length. I need to do it by scaling or setting x and/or y values. I would find it useful if I could set vector length and excalibur would calculate the new x and y values for the vector. For example, I have a space ship actor and when Up-key is pressed acceleration is increased. I would like to check the maximum velocity for the ship. I can do it calling vel.magnitude(). But if acceleration would increase the velocity over maximum I would like to set the magnitude to the maximum velocity but it is not possible very easily. I can do it though by calculating the x and y values according to the new magnitude but it would be easier if excalibur would do it for myself. I think it might be quite commonly used feature. Not a big bad but would be nice to have :)