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
2 registered members (TipmyPip, 1 invisible), 18,787 guests, and 8 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
Physics engine playing up (or just bad code lol) #239318
12/03/08 22:58
12/03/08 22:58
Joined: Oct 2008
Posts: 67
pewpew Offline OP
Junior Member
pewpew  Offline OP
Junior Member

Joined: Oct 2008
Posts: 67
Hey i cant seem to get the physics engine working properly.
I apply physics to an object, and it just goes crazy... flips around the screen and eventually stops.
I read in the manual something about needing a skybox? But i dont have any skybox tga's.

Here is the code:
Code:
	ph_setgravity(vector(0,0,-386));

	tank_base = ent_create("models\\m60_base.mdl", vector(0,0,500), move_tank);
	wait(1);

	tank_turret = ent_create("models\\m60_turret.mdl", tank_base.x, move_turret);
	wait(1);

	phent_settype (tank_base, PH_RIGID, PH_SPHERE); // set the physics entity type
	phent_setmass (tank_base, 300, PH_SPHERE); // and its mass
	phent_setfriction (tank_base, 90); // set the friction
	phent_setdamping (tank_base, 5, 5); // set the damping
	phent_setelasticity (tank_base, 3, 2); // set the elasticity



Last edited by pewpew; 12/03/08 23:06.

HURRR DERP DERP DEERRPP HURR
Re: Physics engine playing up (or just bad code lol) [Re: pewpew] #239429
12/04/08 16:32
12/04/08 16:32
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
you need some level_gemetry in your lvl so the simplest thing you can do is skybox ore a hollow cube (almost the same)

but this doent give this fault
check if your moddel isnt stuck inside your lvl ore turrent

if its the turrent you can make it passable else put you tank higher ore somewhere else


"empty"
Re: Physics engine playing up (or just bad code lol) [Re: flits] #239496
12/04/08 22:54
12/04/08 22:54
Joined: Oct 2008
Posts: 67
pewpew Offline OP
Junior Member
pewpew  Offline OP
Junior Member

Joined: Oct 2008
Posts: 67
is a hollow cube just one of those "prefabs" that you insert into the level with WED ? or is it a physical cube that is textured from the inside-out? (i tried both but still get problems)


EDIT: I tried putting a skycube in (.tga) but the tank itself still just flips out and jams in the sky:



Last edited by pewpew; 12/04/08 23:18.

HURRR DERP DERP DEERRPP HURR
Re: Physics engine playing up (or just bad code lol) [Re: pewpew] #239531
12/05/08 08:10
12/05/08 08:10
Joined: Oct 2008
Posts: 67
pewpew Offline OP
Junior Member
pewpew  Offline OP
Junior Member

Joined: Oct 2008
Posts: 67
ehh i've tried everything and cant seem to figure out what the problem is. read through a heap of different manuals etc.

i found the car level example, but the physics setup is pretty complex (when you compare it to the example in the help menu).

Could somebody please give me an example of how they would apply simple physics to a car/tank/vehicle?
smile


HURRR DERP DERP DEERRPP HURR

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