Inverting numbers(?)
in
Contributed Library Questions
•
6 months ago
Hey everyone,
I am having this issue I can't seem to figure out. I'll try and explain;
Thanks a bunch.
I am having this issue I can't seem to figure out. I'll try and explain;
I am using PeasyCam for camera operation, and I have all these Nodes in a network. Now, I want each node to have a thicker stroke, as the camera position moves closer to it.
- // get current camera position as a PVector
- float[] position = cam.getPosition();
- PVector pos = new PVector (position[0], position[1], position[2]);
- // get distance between current camera position and the current node
- float distance = dist(pointloc.x, pointloc.y, pointloc.z, pos.x, pos.y, pos.z);
- strokeWeight(distance*0.1);
- point(pointloc.x, pointloc.y, pointloc.z);
Any suggestions?
Thanks a bunch.
/Claus
1