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.

collision and scale :(

3 posters

Go down

collision and scale :( Empty collision and scale :(

Post  sakrist Wed May 13, 2009 3:58 pm

Hello

I have problems

If i scaled object then collision is don't working. If scale of object = 1 then all is great!

tutorial 9

Why Question Question Question Question

Please, help Exclamation Exclamation Exclamation Exclamation Exclamation

Thanks!


Last edited by sakrist on Tue May 19, 2009 6:23 am; edited 1 time in total
sakrist
sakrist

Posts : 23
Join date : 2009-04-28
Age : 36

http://www.developers-life.com

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sio2interactive Wed May 13, 2009 4:08 pm

Bullet doesn't support scaled matrices... and watch the video tutorial06_1 I talk about that in details...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sw Wed May 13, 2009 8:35 pm

you can remove the physic attribute and then add the physic attribute after you scale the object
sw
sw

Posts : 73
Join date : 2008-10-12

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sakrist Fri May 15, 2009 9:14 am

sw wrote:you can remove the physic attribute and then add the physic attribute after you scale the object

how to do it?

please

Code:

SIO2object *object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource,
                                           SIO2_OBJECT,
                                           objectName );
   
   
   sio2PhysicRemoveObject( sio2->_SIO2physic, object );
   
   object->_SIO2transform->scl->x = 0.5;
   object->_SIO2transform->scl->y = 0.5;
   object->_SIO2transform->scl->z = 0.5;
   
   sio2PhysicAddObject( sio2->_SIO2physic, object );

this code don't work
sakrist
sakrist

Posts : 23
Join date : 2009-04-28
Age : 36

http://www.developers-life.com

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sw Fri May 15, 2009 10:12 am

sio2PhysicRemoveObject( sio2->_SIO2physic, object );

object->_SIO2transform->scl->x = 0.5;
object->_SIO2transform->scl->y = 0.5;
object->_SIO2transform->scl->z = 0.5;

object->dim->x = object->dim->x * 0.5f;
object->dim->y = object->dim->y * 0.5f;
object->dim->z = object->dim->z * 0.5f;

sio2PhysicAddObject( sio2->_SIO2physic, object );
sw
sw

Posts : 73
Join date : 2008-10-12

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sakrist Fri May 15, 2009 2:22 pm

sw wrote:sio2PhysicRemoveObject( sio2->_SIO2physic, object );

object->_SIO2transform->scl->x = 0.5;
object->_SIO2transform->scl->y = 0.5;
object->_SIO2transform->scl->z = 0.5;

object->dim->x = object->dim->x * 0.5f;
object->dim->y = object->dim->y * 0.5f;
object->dim->z = object->dim->z * 0.5f;

sio2PhysicAddObject( sio2->_SIO2physic, object );

thanks

camera is work , but not collision pale

what me doing Question


Last edited by sakrist on Tue May 19, 2009 6:23 am; edited 1 time in total
sakrist
sakrist

Posts : 23
Join date : 2009-04-28
Age : 36

http://www.developers-life.com

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sakrist Fri May 15, 2009 2:30 pm

sio2interactive wrote:Bullet doesn't support scaled matrices... and watch the video tutorial06_1 I talk about that in details...

Which of the video?


Last edited by sakrist on Tue May 19, 2009 6:23 am; edited 1 time in total
sakrist
sakrist

Posts : 23
Join date : 2009-04-28
Age : 36

http://www.developers-life.com

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  sw Fri May 15, 2009 9:06 pm

sakrist wrote:
sw wrote:sio2PhysicRemoveObject( sio2->_SIO2physic, object );

object->_SIO2transform->scl->x = 0.5;
object->_SIO2transform->scl->y = 0.5;
object->_SIO2transform->scl->z = 0.5;

object->dim->x = object->dim->x * 0.5f;
object->dim->y = object->dim->y * 0.5f;
object->dim->z = object->dim->z * 0.5f;

sio2PhysicAddObject( sio2->_SIO2physic, object );

thanks

camera is work , but not collision pale

what me doing Question
You need to adjust the origin of the collision object
sw
sw

Posts : 73
Join date : 2008-10-12

Back to top Go down

collision and scale :( Empty Re: collision and scale :(

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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