sio2ObjectDuplicate only works for Physic object ?
3 posters
sio2ObjectDuplicate only works for Physic object ?
in sio2ObjectDuplicate :
sio2PhysicAddObject( sio2->_SIO2physic,
dup );
does really need to add physic attribute ?
sio2PhysicAddObject( sio2->_SIO2physic,
dup );
does really need to add physic attribute ?
sw- Posts : 73
Join date : 2008-10-12
Re: sio2ObjectDuplicate only works for Physic object ?
the project I'm currently working on, does not need any physics feature so I am using this one, is the old sio2ObjectDuplicate(). works fine.
- Code:
SIO2object *oldObjectDuplicate( SIO2object *_SIO2object,char *_name )
{
SIO2object *dup = sio2ObjectInit( _name );
memcpy( dup->_SIO2transform->loc, _SIO2object->_SIO2transform->loc, 12 );
memcpy( dup->_SIO2transform->rot, _SIO2object->_SIO2transform->rot, 12 );
memcpy( dup->_SIO2transform->scl, _SIO2object->_SIO2transform->scl, 12 );
memcpy( dup->dim, _SIO2object->dim, 12 );
dup->rad = _SIO2object->rad;
dup->flags = _SIO2object->flags;
dup->bounds = _SIO2object->bounds;
dup->mass = _SIO2object->mass;
dup->damp = _SIO2object->damp;
dup->rotdamp = _SIO2object->rotdamp;
sio2StringCpy( dup->instname, _SIO2object->name );
dup->_SIO2instance = _SIO2object;
return dup;
}
exavi- Posts : 37
Join date : 2008-10-21
Re: sio2ObjectDuplicate only works for Physic object ?
sw: You do have a point, I change the function prototype to receive a 1 or 0 to copy or not the physic attributes... I already commit it so you can find the MOD in the latest SVN rev.
Cheers,
Cheers,
Similar topics
» How does the SIO2timer works
» Physic object
» How to get Transform from Physic Object?
» Moving an Object before physic
» sio2CameraSetPerspective
» Physic object
» How to get Transform from Physic Object?
» Moving an Object before physic
» sio2CameraSetPerspective
Permissions in this forum:
You cannot reply to topics in this forum