1 registered members (TipmyPip),
18,449
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
(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
n00bie
OP
Junior Member
|
OP
Junior Member
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:
//////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
Expert
|
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: Vectors are not pointers. Then it should be: And remember always, lite-C is Case-Sensitive.
|
|
|
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
User
|
User
Joined: Dec 2008
Posts: 528
Wagga, Australia
|
@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'
|
|
|
|