Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,512 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
center of mass #296933
11/03/09 21:27
11/03/09 21:27
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
Every airplane has its center of mass where its engine is set, since engine is the heaviest part. But in my plane, the center of mass is just at the geometric center of the plane model, so it does not properly fall down on the ground when in the air, not lke normal planes. It falls without chnaging its direction, e.g. if the plane was flying horizontally to the ground, it falls horizontally to the ground as well. I have PH_BOX, so it behaves as if it is a box, how to make gamestudio understand that the plane's tale is lighter than its engine part? I cannot make it PH_POLY, since it is a moving object.


a generator of dull questions smile
Re: center of mass [Re: BastovBros] #296942
11/03/09 22:07
11/03/09 22:07
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I THINK this may work, but Ive never tried it.
Im not making the tail lighter, but making the engines heavier.

Have a read of the "physics constraints" in the manual.
Then when youve got an idea how it works, do this.
1> create physics entities that are invisible AND passable of an un-important shape or skin.
2> use the contraints to "weld" these weights INSIDE the planes engine cowlings,
or where-ever the extra weight is needed.
With the entities being invisible and passable, ALL they do is affect the planes
center-of-gravity by making "heavy points" where the planes mass is denser,
and because they are invisible and passable they'll never cause collisions,
or be seen...

Hope this helps.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: center of mass [Re: EvilSOB] #300246
11/30/09 19:22
11/30/09 19:22
Joined: Jul 2007
Posts: 53
Germany
Henning Offline
Junior Member
Henning  Offline
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hi,

your problem is a misunderstanding of the physics. In a room without air, an airplane (and any other object) just falls to the ground without changing any angle, i.e. it falls as it was dropped. Center of gravity has no influence on that. What makes an aircraft fall nose first is the balance between lifting forces at the wings and the tail in combination with the center of gravity. So, what you would need is a simulation of the aerodynamic forces at wings and tail. Maybe possible. Look for aerodynamic lift formulas. COG should be at 1/3 of depth of wing. Ah, you can shift the COG by an additional mass inside the aircraft which cannot be seen from outside.

Good luck
Henning

Re: center of mass [Re: Henning] #300248
11/30/09 19:35
11/30/09 19:35
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Put a constant force upwards on the Tail-wings.
And the same force in the opposing direction.

When turning off the opposing force, the airplane should tumble,
and lean downwards.

(or simply only turn on the upward force when the airplane is
damaged..)

You could put som additional random forces on the wings
and body
turning on an off randomly during falling, wich makes the airplane
tumble even more.

But as Henning said, you cant simulate aerodynamic behavior and turbulances by
using simple ridgid-physics.

look at Mr. Galileo and what he said about a falling feather
in vacuum.

Re: center of mass [Re: Damocles_] #300251
11/30/09 20:04
11/30/09 20:04
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
I know about the Galileo's law which says that in the vacuum the mass doesn't influence the falling speed of an object so that a feather and a stone will hit the ground at the same time, and that it is air resistance which actually makes objects of different masses fall with different speed.
And this is [cite]Ah, you can shift the COG by an additional mass inside the aircraft which cannot be seen from outside.[/cite] is what EvilSOB has already written above. And the "center of gravity" is actually waht I need. I am not trying to make a true-to-life simulation with all that aerodynamic behavior, well it whould behave like a plane but I want to keep it simple. And adding mass will increase the weight, the downward gravity force, which will make the plane fall with its nose first.
Anyways, Thank you for your replies laugh Any reply helps in some way.
Though I am not working on the plane fall right now(I could not make the constraints properly), since the thread was continued, I would like to ask an additional questions about the qonstraints: I saw that all types of constraints have the anchor point: is it the point wehre the two objects are welded? If yes, how to change its position? the anchor point has the coordinates (0,0,0) but are these coordinates: world coordinates, the coordiantes in relation to the object, or what? I tried to change them but the additional invisible object was always in the same place?
Here's how I did it
this was attached o the "adding weight object"
Code:
ENTITY* engine;
action engine()
{
	engine = me;
	set(my, PASSABLE);
	//set(my, INVISIBLE);
	phent_settype(my,PH_RIGID,PH_BOX); 
phent_setmass(my,0,PH_BOX);
 phent_setgroup(my, 2);
phent_setfriction(my,0);
phent_setelasticity(my,0,0); 
phent_setdamping(my,0,0); 
ph_setgravity ( vector(0,0,0) );
ph_fps_max_lock = 70;
}


and this was written in the plane action:
Code:
phcon_add(PH_BALL,my, engine);
phcon_setparams1(2,vector(0,50,0),nullvector,nullvector);


As you see, I have changed the anchor coords, but it didn't change the additional object's position, so I assume that the point to which it is welded has not changed either. So how to deal with this anchor point?
Thank you in advance


a generator of dull questions smile
Re: center of mass [Re: BastovBros] #300281
12/01/09 07:53
12/01/09 07:53
Joined: Jul 2007
Posts: 53
Germany
Henning Offline
Junior Member
Henning  Offline
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hi BastovBros,

if you want to make it easy and halfway realistic, accept your center of gravity, where ever it is, as long as it is on the centerline of the aircraft. Or bring it forward by a hidden mass on centerline. Then apply one upward but small force at the tail and bigger ones at each wing. So, you have three forces, the z components of which should be equal to the aircraft weight (mass*gravity constant), and the COG should be inside the triangle formed by the forces. Ftail*rTail = 2*Fwing*rWing! (r = distance from COG lengthwise)

Now you can steer up and down by altering the tail force and roll by reducing one of the wing forces and increase the other by the same amount.
When you add another sideways force at the tail always heading to the opposite direction than the sideways component of the current velocity vector, your airplane will even stabilize itself. In addition, you can use this to get a yaw steering.

And another tip, give the upward wing forces a small angle to the inside, that will serve as a roll stabilisation like upward swept wings.
So, all you need are four set forces to get precisely the balance I described. When you alter these with velocity sqared and some factor bringing the result to figures the physics system can handle, you get the real behavior of an aircraft - after some testing.

Have fun
Henning

Re: center of mass [Re: Henning] #300296
12/01/09 11:10
12/01/09 11:10
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
Thanks a lot Henning, this might help. Btw, how to calculate the weight (the gravity force) in 3dgs. W = mg, in 3dgs g=-386, because it uses quants, not meters. So, according to the theory, the weight of an object with mass of 23 kg is W = 23 * -386 = -8878, though I put the value for the lift force 8200, which is less then gravity force, but the plane still manages to take off (O_o). Why? How does the 3dgs work with forces? I tried to calculate the exact lift force which would be the same as the gravity force, but I couldn't.


a generator of dull questions smile

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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