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,767 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
Gravity and Force #137604
06/22/07 05:09
06/22/07 05:09
Joined: Jul 2006
Posts: 28
B
burning_devil Offline OP
Newbie
burning_devil  Offline OP
Newbie
B

Joined: Jul 2006
Posts: 28
Hi, I am making a fighting game and I am having trouble with the physics of the game. My problem is that my character has no force or ground friction, he just floats in the air. Is there any way to fix this problem?

Re: Gravity and Force [Re: burning_devil] #137605
06/22/07 07:34
06/22/07 07:34
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
You mean that your players levitate?
If yes, you need (for the beginning) simple gravity to keep your players on the ground.
Code:
 
function gravity
{
while(me)
{
vec_set(temp, my.x);
temp.z -= 500;
trace_mode = IGNORE_ME + IGNORE_PASSABLE + IGNORE_SPRITES;
result = trace (my.x, temp);
my.z -= result;
wait(1);
}
}




Never say never.

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