Tag Info

New answers tagged

0

It looks like your x,y,zoffset variables are set up for the camera in its default position (say, "South" of the player), and don't update when the camera is turned (say, to put the camera "West" of the player) - so when you perform the skill, the camera teleports back to its initial ("South") offset, which puts the player off-screen to its left. I may be ...


0

I'm using this transform: x' = [cos(phi), 0, sin(phi)] y' = [-sin(phi)sin(theta),cos(theta),cos(phi)sin(theta)] z' = [-sin(phi)cos(theta),-sin(theta),cos(phi)cos(theta)] Write these expressions into rows and you've got yourself a transformation matrix. The third parameter (rotation around the z' axis), can be handled like this: x'' = x'cos(alpha) + ...


0

I honestly do not get this FPS/Arcball/Whatever camera nonsense that is going on. Just implement a general purpose camera, with either a transformation as 4x4 matrix or a position as R3 vector and orientation as a 3x3 matrix or quaternion. Then think about how that camera is moving though space. For example I have implemented a general purpose camera with a ...


1

Ahahaha, problem solved, I'm such a math genius ^^: my math library had a typo in function that converts quaternion to a matrix : 1 - 2 * (this.y * this.y - this.z * this.z); - minus times minus makes plus, not minus, as in here: http://www.gameprogrammer.net/delphi3dArchive/quaternions_bestanden/quat1.gif


0

Using following code, I can able to get success in this doubt. Camera camera = GameHUD.this.getCamera(); float[] position = camera .getCameraSceneCoordinatesFromSceneCoordinates(GameManager .getInstance().getMainCharacter().getX(), GameManager ...


4

What you are looking for can be found in this very good explanation: http://www.songho.ca/opengl/gl_transform.html But since I found it sort of confusing without hand holding I will try to explain it here. At this point you need to consider 5 coordinate systems and how they relate to each other. These are the window coordinates, the normalized device ...


1

Assuming your jsfiddle code is what needs fixing, try: function getPortalViewMatrix(cam, src, dst) { return dst.matrix.clone().multiply(cam.matrixWorld); } That syncs the two worlds.



Top 50 recent answers are included