About Store Forum Documentation Contact

Post Reply 
Object scale
Author Message
Brainache Offline

Post: #1
Object scale

I am trying to scale objects and am not having much luck...

I have a chr object file, and I want to dynamicaly change the scale ( for exampple: different size barrels in the dynamcally created object demo)...

How can I do this?
12-20-2008 05:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline

Post: #2
Re: Object scale
I've checked the situation - when using the objCreate the scale is taken from the given Matrix parameter, for example for different sizes in the tutorial you can use the following:

Game::World.objCreate(obj,Matrix(RndF(1,2),Vec(16,8,16))); // added here 'RndF(1,2)' which marks a random floating point value in range 1..2
which will result in creating a matrix of random size 1..2 at point 16,8,16

However now that I'm looking at this code I see that it is a little bit unclear, I'll update this method and its usage in a future version of SDK, to make custom scaling easier and more documented.
12-20-2008 08:44 PM
Find all posts by this user Quote this message in a reply
Post Reply