Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Oct 2011
Offline Last Active May 18 2016 02:03 PM

#5144184 Illarion - An open source online roleplaying game

Posted by on 03 April 2014 - 02:19 PM

Nice idea with the open source thing. Just to warn you though: having the server source publicly available will give you a lot of headaches regarding exploits, item duping etc.

#4903738 Point relative to moving Origin

Posted by on 17 January 2012 - 01:43 PM

Right so now I've got:

point1 = Vector2.Transform(point1, Matrix.CreateRotationZ(angle));
point1 += origin;

Where point1 is the fixed point, and the origin is the well, origin. But this doesn't appear to do anything.

What you need to do is rotate something about the triangles origin. The something is your FixedPoint in relation to the triangles Origin, which means:
Vector something = FixedPoint - Origin; (this is called translation by the way)
Rotate(something, angle);

Afterwards you need to translate it back to where it was to get the correct coordinates:
Vector newFixedPoint = something + origin

Here is the matrix that you need for the rotation - to make sure that you are actually using the correct one: Posted Image