Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Move/Scale/Rotate with Vertexdata Commands

Author
Message
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Aug 2010 21:31 Edited at: 28th Aug 2010 03:26
In case you should ever need such a thing, these functions will let you offset, scale, or rotate an object within its vertexdata. This will, for example, allow you to clone the object and have it keep all these settings.

I'm using it in an editor program where I want to be able to adjust an object and then save it, having it retain the adjustments.

I should note that unlike the DBP command, the vert functions act cumulatively, so if you tell it to rotate the object 40 degrees and then tell it to do 50 degrees, overall the object will be rotated 90 degrees, whereas with ROTATE OBJECT the object would end at 50 degrees.



EDIT: Added Lock flags of 2 to make sure changes stick.


Latest progress: Fog of War implemented
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 31st Aug 2010 21:15 Edited at: 31st Aug 2010 21:26
I've been working on exactly the same thing! The vertex rescaling bit I based mine on was by Cash Curtis II, it looks very similar to yours but seems to have issues rescaling models with Limbs. Not sure why tho.

I'm gonna try your one and see if it makes any difference or not.

>Edit<

I see the difference now when comparing them, CCII's version cycles through the limbs, where as yours just does limb 0.

Neither seem to work with the models I'm trying to convert (Made with 3DWS).

Here is my implementation of Cash Curtis II's rescaling snippet, in case anyone wants to see it.



Login to post a reply

Server time is: 2024-11-21 20:49:37
Your offset time is: 2024-11-21 20:49:37