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,580 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
(lite-C) beginner with Physics, Coin falls into block #278078
07/12/09 01:37
07/12/09 01:37
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Hi,

I'm a beginner with Physics and i've got a question. When I create a coin (munt) the coin does'nt stop by the hollow cube made in 3DGS Level editor.

Here's the code:

Code:
//////entitys\\\\\\

VECTOR* maken_munt;
ENTITY* ent_munt;

/////voids\\\\\

void maak_kast()
{
	while(1)
	{
		ent_munt = ent_create ("munt.mdl", vector(100, 0, 20), NULL); // create the coin
		ph_setgravity (vector(0, 0, -386)); // set the gravity
		phent_settype (ent_munt, PH_RIGID, PH_POLY); // set the physics entity type
		phent_setmass (ent_munt, 15, PH_POLY); // and its mass
		phent_setfriction (ent_munt, 50); // set the friction
		phent_setdamping (ent_munt, 40, 40); // set the damping
		phent_setelasticity (ent_munt, 50, 20); // set the elasticity
}



Do I have to set some things in the level editor? I've used PH_poly because PH_BLOCK, SPHERE and CILYINDER does'nt do what I want...

Re: (lite-C) beginner with Physics, Coin falls into block [Re: n00bie] #278087
07/12/09 06:19
07/12/09 06:19
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
The problem isn't from your code. It's from ODE, and this is a known problem. And it often happends

EDIT:
After taking a bigger look at your code i found this line:
Code:
VECTOR* maken_munt;


Vectors are not pointers. Then it should be:
Code:
VECTOR maken_munt;


And remember always, lite-C is Case-Sensitive.

Re: (lite-C) beginner with Physics, Coin falls into block [Re: Cowabanga] #278090
07/12/09 06:54
07/12/09 06:54
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
If you don't get this to work, there's always newton, which is much more stable.

Re: (lite-C) beginner with Physics, Coin falls into block [Re: the_mehmaster] #278205
07/12/09 16:35
07/12/09 16:35
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
@the_mehmaster Have you got a tutorial for newten - I always used the normal lite-C physic system

Re: (lite-C) beginner with Physics, Coin falls into block [Re: Rei_Ayanami] #278280
07/12/09 22:05
07/12/09 22:05
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Quote:
@the_mehmaster Have you got a tutorial for newten - I always used the normal lite-C physic system

There is a tutorial on VeT's filehosting site. Go to his thread in 'lite-c contributions'

Re: (lite-C) beginner with Physics, Coin falls into block [Re: the_mehmaster] #278282
07/12/09 22:12
07/12/09 22:12
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
oh, thanks very much wink

Re: (lite-C) beginner with Physics, Coin falls into block [Re: Rei_Ayanami] #278284
07/12/09 22:20
07/12/09 22:20
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
I can´t find it, I don´t mean the thread but his site, where?

Re: (lite-C) beginner with Physics, Coin falls into block [Re: Rei_Ayanami] #278317
07/13/09 05:46
07/13/09 05:46
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia

Re: (lite-C) beginner with Physics, Coin falls into block [Re: the_mehmaster] #278330
07/13/09 07:19
07/13/09 07:19
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
3 things:
1. Newton rocks!
2. thank you!
3. I know that I stupid, but cannot find the other parts - or there no more???

And a problem: I downloaded even the examples, and in the tut is written that all functions are in "NewtonAPI2.18.c", but there are so many, which is for what?


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