New answers tagged

0

It's a bit vague what you want to do and what you have. But this should help: Vector3 pos = new Vector3(); Matrix4 nodeTransform = new Matrix4(); nodeTransform.setToTranslation(2, 4, 0).rotate(Vector3.Z, 180f); nodeTransform.getTranslation(pos); Gdx.app.log("Node pos", pos.toString()); Matrix4 modelTransform = new Matrix4(); ...


1

They are describing how to get the nearest point on the moving circle trayectory to the "checking" circle center, without using vector math. Or better , using it but without telling that. var t = dx * distToBubble.x + dy * distToBubble.y; is simply the dot product of the moving vector (velocity vector) and the direction vector from moving circle. Hope ...


1

From you code I can't tell what the ownerv vector is so I can't tell you why it's giving you the wrong result. But to do it from scratch, according to Wikipedia's article on vector projection, you can do the following; Create a vector a that is the direction from o to v. Create a vector b that is the direction from o to n. Let d be the dot product of a ...



Top 50 recent answers are included