|
Physics Engine doesn't disengage??
#19153
11/01/03 06:39
11/01/03 06:39
|
Joined: Mar 2003
Posts: 5,377 USofA
fastlane69
OP
Senior Expert
|
OP
Senior Expert
Joined: Mar 2003
Posts: 5,377
USofA
|
I've waited a long time to post this to make sure it wasn't something in my script, so here goes.
In my project, I need to pick up an object which is under the control of the PE. Now, when the object is still (v=0), I can disengage the PE and use ent_move to attach it to me and thus carry it around. I can then issue a THROW command, which re-engages the PE and applies a set force for a set time. Perfect.
HOWEVER, if the object still has a velocity component to it (ie. not still) when I want to pick it up, the PE dis-engages fine, I can ent_move it fine, BUT WHEN I THROW (RE-ENGAGE THE PE) THE OBJECT HAS IT'S VELOCITY FROM WHEN THE ENGINE WAS PREVIOUSLY ON!!!
I first thought that it was because of the skills, since my entities move in response to a net_force skill vector. But that is absolutely not the case, as in that case it would accelerate, not veloci-rate upon re-engagement of the PE.
So it seems to me that while you can turn off the PE, you don't unregister the object and somewhere, it's velocity is stored and thus when the engine is re-engaged, it loads up these old values for velocity and goes from there. This is the same behaiviour if I use phent_settype to "unregister" the entity from the PE or if I use phent_enable to "temp disable" the PE.
Personally, if I'm turning off the engine, I would like at least the option to zero out the velocity, since I have no direct control over it. Otherwise, I'm missing something critical here...
|
|
|
Re: Physics Engine doesn't disengage??
[Re: fastlane69]
#19154
11/03/03 01:14
11/03/03 01:14
|
Joined: Aug 2003
Posts: 60
SpaceJim
Junior Member
|
Junior Member
Joined: Aug 2003
Posts: 60
|
Instead of disengaging the object why not set a constraint to the hand? Initialising physics objects is slow too so this may also provide a performance boost and make things simpler.
Ok knuckleheads, listen up:
Their = Belonging to, ie "Their wives had beards".
There = As in "Look over there"
They're = Short for "They are"
L O F I G A M E S . C O M
|
|
|
Re: Physics Engine doesn't disengage??
[Re: fastlane69]
#19161
02/25/04 09:33
02/25/04 09:33
|
Joined: Nov 2003
Posts: 19
iprogramgames
Newbie
|
Newbie
Joined: Nov 2003
Posts: 19
|
I am replying to this old post because I have the EXACT same problem. The only solution I have found is to unregister and reregister the physics entity which I'd rather not due as I tend to get crashes. If someone from Conitec is reading this I'd like to request that the physics engine have a new function to zero out the forces applied to a physics entity once that entity has been disabled. This way I could apply new forces once the entity was enabled again. I'm going to post this in several appropriate places in hopes of having this issue resolved.
Newbie... yeah, right.
|
|
|
|