Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Orbit and Gravity #8355
02/20/02 18:58
02/20/02 18:58
Joined: Feb 2002
Posts: 15
Brasil
A
Agamennon Offline OP
Newbie
Agamennon  Offline OP
Newbie
A

Joined: Feb 2002
Posts: 15
Brasil
It is possible to create a small planet ? i beleave the a5 engine treats gravity only to a single vector (down), i want entities to wallk on this planet and be able to trow stuff into orbit, the engine treats maps as flat worlds.. if i do a sphere and place a entitie over, he will fall on the edge, and not be grabed by the planet's gravity how do i simulate this on A5 ??


Sorry about my bad english
Re: Orbit and Gravity #8356
02/21/02 22:24
02/21/02 22:24

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Theoretically, what you are wanting to do is entirely possible.

You will want to make use of the scan function to simulate gravity.

Look in the manual under scan, maybe even scan_floor. You could use this to keep your players on the sphere.

*Hope this Helps*

Re: Orbit and Gravity #8357
02/22/02 03:32
02/22/02 03:32

A
Anonymous
Unregistered
Anonymous
Unregistered
A



A5 does not treat levels as flat, gravity is merely part of the template scripts.

You will have to program all the gravity and space physics yourself, it will be complex but its possible.

if you try using trace, and trace from the spaceship to the planets center, you will have the distance to the planet which you can use to determine pull strength, and use vec_to_angle to find the direction to the planet. You would need forces for the ships thrust etc, and separate forces for gravity ie
ent_move(thrust.x,gravitypull.x);
I'm afraid I cant work out how to move it in the direction of the planet, but it is possible.

Re: Orbit and Gravity #8358
02/22/02 14:06
02/22/02 14:06
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
SpaceJim has a pretty good handle on space! (Surprise, surprise)

Just to embelish, you don't need to do a trace at all to determine gravity.
just use a vec_dist command on the player.pos and planet.pos to get the distance.

From the distance away, derive the force of gravity.

Take the force, and convert it to a vector.

Use the vec_rotate command to point your gravity vector at the planet.

apply this rotated force to your entity being influenced by gravity.

I'll leave the details to you, but I hope this gets you started!

- WildCat


Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!

Moderated by  HeelX, Spirit 

Gamestudio download | 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