Jump to content

Set angle between poly


Sonofabeat

Recommended Posts

Hello folks.

I need to manually set the angle between 2 polygon, i now how to calculate the angle but i'm stuck on how to set it to a different value, i think that i have move the vertex opposite to the adiacent edge but i don't now how to find the correct coordinate.

Thank

 

Link to comment
Share on other sites

Maybe this helps. its written for adding 45 degrees to the up normal, but the code could maybe also be used or converted to work for your goal.

 

v@up;

float angle = radians(45);

float cs = cos(angle);

float sn = sin(angle);

@up.x = v@at.x * cs - v@at.z * sn;

@up.z = v@at.x * sn + v@at.z * cs;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...