resizing bodies after creation?

foxbat

23-06-2006 04:10:33

Hi.

I'm wondering whether there is a way of resizing a body after it has been created; for example, fitting a capsule to the player when he crouches or goes prone.

Thanks!

magura

23-06-2006 08:31:55

taking a stab here, but i think you could just change the body->actor->shapes

if it doesnt work while simulating, you probably have to freeze the body first, and then unfreeze it after

betajaen

23-06-2006 09:43:23

I don't think you can, i think body->actor->shapes are just for storage and just "read-only" data.

But as Magura is usually right you can have a stab at it, but ye be venturing into PhysX ShapeDescription territory arr.

However, if you want to want to change the shape for a simple prone/crouch/standing up thing for a character there is a much easier and better way, by using extends. Only applies to the character controller though :P

magura

23-06-2006 13:28:12

im probably not right, my only exposure to novodex is through nxogre :(

as a matter of interest, how would one change the physics representation of an object after construction?

betajaen

23-06-2006 15:14:07

If it is possible you'd have to just access the shapes like you said, change the shape and hope it would work.

I'd be trying this out right now if I had a working PC.

Else, you could be very safe and you could just destroy the object and create a new one based on the previous one which changes.