Jump to content
  • Advertisement
Sign in to follow this  
bob23bob

convert from off-center object space to center

This topic is 3509 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, So I have this mesh whose object space origin is not the center of the object itself, but offset some distance away. Instead of 're-exporting' this mesh with a centered object-space origin, is there a way to do this programatically? Basically I'd like to modify all the verts in this mesh to be relative to the 'center' of the object itself. How might I approach this problem? Thanks for any hints ! -b

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by bob23bob
Basically I'd like to modify all the verts in this mesh to be relative to the 'center' of the object itself. How might I approach this problem?
First calculate the new center of the object, then subtract this from the old center, and add the resulting vector to each vertex in the mesh.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!