Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


the_visualist

Member Since 11 Oct 2011
Offline Last Active Apr 07 2015 07:24 AM

#5144184 Illarion - An open source online roleplaying game

Posted by the_visualist 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 the_visualist 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

the_visualist


PARTNERS