FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Randomly change one's position or what?

Go down

Randomly change one's position or what? Empty Randomly change one's position or what?

Post  kazuki on Wed Oct 28, 2009 3:24 am

And a copy, I'd like to see a random position change, I change position significantly. To do so should I change it?
It's like what you write.
[code]
for(i = 0; i < 4; i++) {
_SIO2parent = object->_SIO2instance ? ( SIO2object * )object->_SIO2instance : object;
sprintf( name, "%s_%d", _SIO2parent->name, i );
duplicate = sio2ObjectHardCopy( _SIO2parent, name );
//duplicate = sio2ObjectSoftCopy(_SIO2parent, name);

if(i == 0) {
object->_SIO2transform->loc->x = ((rand() % 21) -10)*0.1;
}


sio2TransformCopy( duplicate->_SIO2transform,object->_SIO2transform);
sio2TransformBindMatrix(duplicate->_SIO2transform );
//sio2ObjectGenId(duplicate);

}

kazuki

Posts : 7
Join date : 2009-08-23
Age : 33
Location : japan

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum