Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, SBGuy, TipmyPip, ozgur), 923 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Physics Engine doesn't disengage?? #19153
11/01/03 06:39
11/01/03 06:39
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline 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 Offline
Junior Member
SpaceJim  Offline
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: SpaceJim] #19155
11/03/03 03:17
11/03/03 03:17
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Several reasons. I want to pick up an object and not have that act affect my player. If I set a contraint, then the object is locked into my player physically and I get dynamics I don't want.

By disengaging/unregitering an object, my hope was that I wouldn't be losing processing power to the physics engine since my held object would be just blindly attached to the player by a ent_move command. I feel this actually uses less resources than relying on the PE.

As I've posted, this disengagement approach works perfectly with the exception of residual velocity (or maybe momentum??) at re-engagement.

Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19156
11/05/03 12:33
11/05/03 12:33
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Wanted to generate a new response to re-emphasize my dilema.

I need to know if this is bug, code, or meant to happen.

PLZ HELP.

Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19157
12/02/03 03:16
12/02/03 03:16
Joined: Aug 2003
Posts: 275
Germany
kopitzki Offline
Member
kopitzki  Offline
Member

Joined: Aug 2003
Posts: 275
Germany
QUOTE: 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.

You're right. I've got a PE that constantly orbits around a center. With each frame I turn off/on phent_enable to readjust its pan, and it moves on without the orbiting force renewed. Frankly, the readjusting of the panning doesn't seem to be smooth, despite a high frame rate. Maybe phent_settype ( entity, 0, var hull disengages correctly.


Re: Physics Engine doesn't disengage?? [Re: kopitzki] #19158
12/02/03 04:51
12/02/03 04:51
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Thansk freak. I've tried that as well and no go. I thought that since phent_enable just temporeraly disabled and entity that the problem was there. HOwever when I phent_settyped my object to UNREGISTER the object, upon re-registration it's still has it's old velocity.

I think I picked up from somewhere in the manual that once an object is registered with the PE, it's never truly unregistered and thus stays (in memory?) the entire time the prog is running.

Can any more people in the 3DGS community please verify this behaivior on their usage of the PE? If I can get a few more people detailing this problem, I can repost this as a legitamate bug.

Thanks!


Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19159
02/15/04 18:29
02/15/04 18:29
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline
User
clone45  Offline
User

Joined: Mar 2002
Posts: 580
San Francisco

I'm running into exactly the same issues. I have a game that's similar to a free kick in to a soccer goal. After a kick, I don't want to have to wait until the ball has completely stopped moving before I reset it on the kicking area. But if I don't wait, once I turn the physics engine on - the ball still has velocity.

It's quite a pain!!
-b

Re: Physics Engine doesn't disengage?? [Re: clone45] #19160
02/16/04 02:54
02/16/04 02:54
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I'm going to focus on this and post this under bugs to get an official response.

Keep an eye out for it so you can post your own experiences there!


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 Offline
Newbie
iprogramgames  Offline
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.
Re: Physics Engine doesn't disengage?? [Re: iprogramgames] #19162
02/25/04 09:51
02/25/04 09:51
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Sorry fastlane, I must have missed this post.

Looking at the code I don't see why velocity should still be set. I am deleting all physics parameters associated with the entity, and initalize a brand new one for the second phent_settype call. I still have to double-check that with a script though.

Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1