Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, alibaba), 1,184 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Physic do some strange things #262955
04/27/09 08:14
04/27/09 08:14
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline 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:
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: Ralph] #262969
04/27/09 09:25
04/27/09 09:25
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
this is the action of AK? why void not action?


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
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 Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Originally Posted By: Jaxas
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: Ralph] #263039
04/27/09 17:36
04/27/09 17:36
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...
Quote:
Some of the AK's are fallen into the terrian

Because they're acting like a box.

Quote:
some fly 100 miles away when they hit the terrian

Decrease the bouncing.

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 Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Quote:
Quote:
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?? smirk

Quote:
Quote:
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.
Re: Physic do some strange things [Re: Ralph] #263056
04/27/09 18:23
04/27/09 18:23
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...
1) Well yes, because the size and the shape of the mesh is like a box. So it's not correct.

2) So i have no idea. Sorry.

Re: Physic do some strange things [Re: Cowabanga] #263059
04/27/09 18:26
04/27/09 18:26
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Here is a better Screenshot with the bounding box.

Click on the picture to enlarge it.

Re: Physic do some strange things [Re: Ralph] #263590
04/30/09 16:38
04/30/09 16:38
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
Ralph did you change ph_fps_max_lock variable in code?
Or maybe you set wrong factors for physics collision contact points ph_setcollisions?


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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