I'm working on an object moving around an attractor (maths mainly based on the GravitationalAttraction3D example).
However, I'd like to have it leave a trail to make it a bit more obvious. The point moves around in the expected fashion, but leaves no trail.
It's been a while since I've tried processing (never really got the hang of arrays the first time!) but this code also looks wrong. Is there anyway I can leave a trail, and make the code more readable?
Agh! I swear I'll start contributing soon. Sorry for all the questions.
Anyway, what I want to do is write a method/function for rotating a vector in 3 dimensions around an arbitrary point whilst maintaining magnitude. Kind of like spherical coordinates, but applied to PVector objects.
Alright, I'm trying to build a first person game. Got most of it done, but am having trouble with the camera (I only need it to look around, not up and down): I've got the lookaround part, doing the direction in polar co-ordinates then converting from that to cartesian coordinates and setting the look-to distance to somwhere in the region of 30000. Now, the problem I have is how I can make this be the direction for the player to move in. So, what I need is a way to look around, then move the player in the direction they are facing. The early camera I have at the moment can look around, but only moves up and down the axes, as the movement just consists of "if 'w' pressed, playerXpos++".
I'm having a some trouble with a unfinished game. It runs fine in the processing IDE when I hit run, but whenever I try to export it (Both to windows application (non-full screen) and web applet), it just appears as a blank white screen/window. Any help would be appreciated.
Is there any way to change code during the run of the sketch? My problem is that I need to get change a level for a game. Levels are stored in a class called "Level". So, to bring a new level, say level 1, I go level.level1 And that will spawn the new level. What I want to be able to do is to change the "1" at the end of level.level1 so I can switch levels. Any other code corrections would be nice too, though! Code:
With the IDE highlighting line 26. As you can see, there isn't a backslash on that line, so the only problem I can think of is that my IDE is a bit wrong, or there is some strange and mystical invisible backslash character somewhere in there. I've had it happen on multiple projects, but this one just annoyed me enough to post.
Second question: Is there a way to resize the processing window or applet, without changing the pixels, as it were? Like a window 600x300 px, but processing drawing lines and all in a 300x150 grid of pixels at the 600x300 px window size? I want to try and make a pixel-ly game, but don't know if I have to introduce extra code to achieve this.