2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Physic do some strange things
#262955
04/27/09 08:14
04/27/09 08:14
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
I have a big problem, i want that my weapons fall down like in reality. But the physic do some strange things.. Some of the AK's are fallen into the terrian, some fly 100 miles away when they hit the terrian and some stuck in the terrian. What can i do to fix that? Here is my code:
void waeponOnGround_main()
{
wait(1);
c_setminmax(me);
me.ambient = 100;
me.pan = 10; me.tilt = -10; me.roll = 110;
phent_settype(me,PH_RIGID,PH_BOX);
phent_setmass(me,1,PH_BOX);
phent_setfriction(me,100);
phent_setelasticity(me,10,5);
phent_setdamping(me,50,100);
ph_setgravity(vector(0,0,-500));
ph_setautodisable(0.05, 0.02, 10, 0.1);
VECTOR vDrop;
vDrop.x = 10; vDrop.y = 0; vDrop.z = 75;
phent_addvelcentral(me,vDrop);
me.material = mat_metal;
//set(me,SHADOW);
while(me != NULL)
{
if(vec_dist(my.x,player.x)>20)
{
if(player.skill8 == 0)
{
player.skill8 = 1;
ent_remove(me);
}
}
wait(1);
}
}
Thanks, Ralph.
|
|
|
Re: Physic do some strange things
[Re: Jaxas]
#263017
04/27/09 16:20
04/27/09 16:20
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
this is the action of AK? why void not action? #1 Yes this is the "action" of the AK. #2 Because they are the same! (typedef void action; <-- this is from the acknex.h) And now no off-topic questions,please. I really need help with it!
|
|
|
Re: Physic do some strange things
[Re: Cowabanga]
#263054
04/27/09 18:19
04/27/09 18:19
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
Some of the AK's are fallen into the terrian Because they're acting like a box. So its normal that a box fall into the terrian or stuck in it?? some fly 100 miles away when they hit the terrian Decrease the bouncing. I say "some" not all, some of them are acting like they should and some do this strange things...
Last edited by Ralph; 04/27/09 18:21.
|
|
|
|