up to now we have moved up, down, left & right. but what about moving around like a tank, or even the ship from asteroids?
starting by creating a new project, right away making a new Player.hx class.
we setup our position & velocity using vectors & put in speed, rotation & rotation speed. we create a function to help us rotate much better & then handle the rotation.
lastly we finish off by setting our player up in Project.hx, update & render
*we dont really need to use vectors, but they are nice to tidy up code & make things look sexy*
source code:
https://github.com/lewislepton/kha-tutorial-series
SUPPORT ON PATREON FROM AS LITTLE AS $1:
https://patreon.com/lewislepton
intro & outro music is from this EP:
https://lewislepton.bandcamp.com/album/coat-noise-ep
like, share & subscribe to stay up to date.
https://lewislepton.com
https://patreon.com/lewislepton
https://twitter.com/lewislepton
https://facebook.com/lewislepton
https://lewislepton.bandcamp.com
https://soundcloud.com/lewislepton
https://github.com/lewislepton