Updated software/documentation for JS coding.
So I was on youtube today and I was greatly interested in PVector. However, I was 6 episodes by "The Code Train" on Vectors and found myself trying to impliment it into the code of a program. I dedicated a couple of hours of watching videos outside of Khan Academy because there was a lack of documentation on PVector. I took notes and everything.
At this point I've created the var player = new PVector(x,y); etc for player, velocity, location, acceleration and target. I then attempted to start implementing what I learned by typing Velocity.Limit(5) or create a vector to create a target trajectory by using
shotTrajectory = location.add(mouseX, mouseY);. so I could put it in a function for shooting, even tried shotTrajectory.setMag(20); I was simply told that it wasn't a function. Is the software old?
https://processing.org/reference/PVector.html
shows all these as viable functions of vectors. needs to be a better way than me manually calculating everything. If I'm jacking it up on syntax and it is viable then please let me know. Thanks.
Post is afgesloten voor opmerkingen.