Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, VoroneTZ), 456 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19173
02/28/04 06:57
02/28/04 06:57
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
Quote:

First off, YES!!!! Finally recognition that I"m NOT nuts!!!
Secondly, just to make sure, this is expected behaiviour and not a bug?



Yes it is expected behavior. phent_enable() is basically just setting a flag putting the object into pause mode- thus it's extremely fast to execute.

I thought you were referring to phent_settype() earlier (which does perform a reset but is slow).

Quote:

2)Even within phent_enable, I can use the velocity govenor (phent_setmaxspeed()) as a way to trick my PE into setting my velocity to 0. This is sneaky...hadn't thought of it..



It is sneaky and not as straight-forward as something like a setvelocity() call would be. I am very concerned that setting velocity directly might screw things up easily. But adding a clearvelocity() function could be a useful additions..or not?

Re: Physics Engine doesn't disengage?? [Re: Marco_Grubert] #19174
02/28/04 11:27
02/28/04 11:27
Joined: Nov 2003
Posts: 19
iprogramgames Offline
Newbie
iprogramgames  Offline
Newbie

Joined: Nov 2003
Posts: 19
A clearvelocity() function sounds great!!!

Then I could do something like:

var force[3];

force = 100000;

me = pPlayer;
you = pBall;

clearvelocity(you); //new clear velocity function

phent_enable(you,1);

temp.x = cos(my.pan) * force;
temp.y = sin(my.pan) * force;
temp.z = 0;

phent_addcentralforce(you,temp);


Newbie... yeah, right.
Re: Physics Engine doesn't disengage?? [Re: iprogramgames] #19175
02/28/04 11:56
02/28/04 11:56
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 think that would be GREAT Marco, though if it's going to do nothing diffrent than the velocity governor can do, then I'd stick to an addendum in the manual under phent_setmaxvelocity and perhaps optimize phent_setmaxvel so that on a 0,0,0 parameter pass, it acts like the clear velocity.

What advantages, if any, would there be to a separate call to clear velocity? Maybe a complete kinematic wipe on an entity would be better, with velocity and force set to zero? That could be handy and if you only want vel zeroed, you'd use the governor or if you just want the force zeroed, you'd use a phent_addforce(null) call.

On another note, you said:
Quote:

which does perform a reset but is slow




Slow, huh? In order to completely reset a entities PE record (velocity and force and what else?), how many server frames should I give it? Right now I just have it under a wait(1) command.

Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19176
02/29/04 03:22
02/29/04 03:22
Joined: Nov 2003
Posts: 19
iprogramgames Offline
Newbie
iprogramgames  Offline
Newbie

Joined: Nov 2003
Posts: 19
I don't know what code is under the hood but I think altering phent_setmaxvel may cause problems as it's used to stop the entity after it's reached a certain velocity. Altering it the way you suggest would change it's behavior for paramaters of 0,0,0 only and I'm not sure that's such a good idea. It would probably be easier and cleaner to add different behaviors via new functions as opposed to altering existing ones.

Regardless of what code is "under the hood" I think we are both interested in a quick function that simply resets the variables to zero WITHOUT unregistering the entity. This way when we apply forces via phent_addvelocity we will know there are no existing forces already there. Is my assumption correct, because clearvelocity() definatly sounds like what I need.


Newbie... yeah, right.
Re: Physics Engine doesn't disengage?? [Re: iprogramgames] #19177
02/29/04 04:04
02/29/04 04:04
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Spot on Ipro. That's all I think we need, something to clear out all relavant forces and velocities and thus giving a clean slate for a PE without the need to disengage.

Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19178
03/01/04 06:44
03/01/04 06:44
Joined: Nov 2003
Posts: 19
iprogramgames Offline
Newbie
iprogramgames  Offline
Newbie

Joined: Nov 2003
Posts: 19
Agreed


Newbie... yeah, right.
Re: Physics Engine doesn't disengage?? [Re: iprogramgames] #19179
03/02/04 06:34
03/02/04 06:34
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
phent_clearvelocity() should be in the next update.

Re: Physics Engine doesn't disengage?? [Re: Marco_Grubert] #19180
03/02/04 10:09
03/02/04 10:09
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline OP
Senior Expert
fastlane69  Offline OP
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
schwwweeeeet!
Thanks!


Re: Physics Engine doesn't disengage?? [Re: fastlane69] #19181
09/09/04 01:27
09/09/04 01:27
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40
1. Has our "phent_clearvelocity()" function been added yet. I've been waiting a long time

2. Marco. I need my original forum account's email address reset so I can get my lost password. I've sent several emails that were supposed to be forworded to you. Have they made it?

Al Tucker

Re: Physics Engine doesn't disengage?? [Re: iprogramgames2] #19182
09/21/04 13:21
09/21/04 13:21
Joined: Sep 2004
Posts: 40
I
iprogramgames2 Offline
Newbie
iprogramgames2  Offline
Newbie
I

Joined: Sep 2004
Posts: 40
Eh, hem... Anyone there to answer my question above? I've been patient.

Page 3 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