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
3 registered members (Quad, VoroneTZ, 1 invisible), 852 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 9 1 2 3 4 5 6 7 8 9
Re: some a6 physics questions #15411
04/26/03 20:44
04/26/03 20:44
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
some more question:

if a physics entity stops movement completely (but is still a physics entity) it does only require very minimal or no cpu performance right?

if i stack some boxes then i can notice that they jitter a little sometimes when i look very closely. how can i avoid this? ...because i think this takes more cpu performance than it would take when they were completely standing still.

Re: some a6 physics questions #15412
04/26/03 21:32
04/26/03 21:32
Joined: Jun 2002
Posts: 473
Juff Offline
Senior Member
Juff  Offline
Senior Member

Joined: Jun 2002
Posts: 473
how do I add gravity to the code ventilator posted
EDIT nevermind I got it, this is really cool

Re: some a6 physics questions #15413
04/26/03 21:40
04/26/03 21:40

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Yo could try:

var earthgravity[3] = 0,0, -386; //////////////////////////////
// -386 is the downward pulling force along the z axis
//////////////////////////////

action sphere
{

my.shadow=on;

ph_setgravity( earthgravity );//////////////////////////////
// and now you set the gravity
//////////////////////////////
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 70, 5);
phent_setdamping(my, 20, 20 );

temp.x=cos(camera.pan)*cos(camera.tilt)*300000;
temp.y=sin(camera.pan)*cos(camera.tilt)*300000;
temp.z=sin(camera.tilt)*300000;
phent_addforcelocal(my,temp,nullvector);

}

string mdl_sphere=<sphere_0.mdl>;
function emit_sphere()
{

temp.x=camera.x+cos(camera.pan)*cos(camera.tilt)*100;
temp.y=camera.y+sin(camera.pan)*cos(camera.tilt)*100;
temp.z=camera.z+sin(camera.tilt)*100;
ent_create(mdl_sphere,temp,sphere);
}
on_mouse_left=emit_sphere;

Re: some a6 physics questions #15414
04/26/03 23:06
04/26/03 23:06

A
Anonymous
Unregistered
Anonymous
Unregistered
A



lets update our profile

Re: some a6 physics questions #15415
04/27/03 00:53
04/27/03 00:53
Joined: Jun 2002
Posts: 473
Juff Offline
Senior Member
Juff  Offline
Senior Member

Joined: Jun 2002
Posts: 473
okay now I want the ball to be removed about 5 seconds after I shoot it, so i can shoot another ball, since I have com.

Re: some a6 physics questions #15416
04/27/03 01:02
04/27/03 01:02
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
code:
action sphere
{
my.shadow=on;
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 50, 10);
phent_setdamping(my, 20, 20 );
temp.x=cos(camera.pan)*cos(camera.tilt)*300000;
temp.y=sin(camera.pan)*cos(camera.tilt)*300000;
temp.z=sin(camera.tilt)*300000;
phent_addforcelocal(my,temp,nullvector);

sleep(5);
ent_remove(my);
}

this could work...

Re: some a6 physics questions #15417
04/27/03 01:40
04/27/03 01:40
Joined: Jun 2002
Posts: 473
Juff Offline
Senior Member
Juff  Offline
Senior Member

Joined: Jun 2002
Posts: 473
thanks alot [Big Grin] but I need one more thing [Roll Eyes]
I want it so that if you press the left mouse button, you can't shoot another ball for 5 seconds, so I don't get that error
thanks

Re: some a6 physics questions #15418
04/27/03 01:44
04/27/03 01:44
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
code:
action sphere
{
my.shadow=on;
phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 5, PH_SPHERE);
phent_setfriction(my, 70);
phent_setelasticity(my, 50, 10);
phent_setdamping(my, 20, 20 );
temp.x=cos(camera.pan)*cos(camera.tilt)*300000;
temp.y=sin(camera.pan)*cos(camera.tilt)*300000;
temp.z=sin(camera.tilt)*300000;
phent_addforcelocal(my,temp,nullvector);


on_mouse_left=null;
sleep(5);
on_mouse_left=emit_sphere;
ent_remove(my);
}

...could work! [Smile]

Re: some a6 physics questions #15419
04/27/03 01:49
04/27/03 01:49
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Hey, since we talking about wheels, let me ask this:
Is rotational inertia ("I") implemented?

It doesn't seem to be. There is a setMass, but no setRotInertia or the like. In the absense of "I", it would be more accurate to say that we can impart entities with a set angular acceleration and that __torque has nothing to do with it__. The help files even say this:

"The torque vector can be visualized as the axis of desired rotation and the magnitude of this vector determines the desired acceleration"

By this definition, I'm guessing you use a unit "I" for all rotations so that

Torque = Angular Accelration x 1

However, the definition of mass states that "...Thus by increasing an object’s mass you will have to use a stronger force (or torque) to make them move..." by which I believe that

Torque = Angular Acceleration x Mass

If I'm mistaken or if "I" will be implemented later, I would like to know so I don't have to implement it myself. Otherwise a verification of which equation is actually used would be most helpful!

[Smile]

Re: some a6 physics questions #15420
04/27/03 02:00
04/27/03 02:00
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
quote:
An object's hulltype determines its resistance to torque and thus the way it rotates. You can use one of the predefined constants to use an approximation of the object's shape or use PH_POLY to deduce the actual shape.
maybe this is what you are looking for?

Page 2 of 9 1 2 3 4 5 6 7 8 9

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