Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can't apply force in X direction!! #25898
04/09/04 18:09
04/09/04 18:09
Joined: Sep 2003
Posts: 21
cool Offline OP
Newbie
cool  Offline OP
Newbie

Joined: Sep 2003
Posts: 21
Hi all,

I am doing something related to physics.....my problem is i cant apply force in x direction...y & z are OK

code
=====================================
vec_set(temp, vector(1, 0, 0));//x dir{here no movement of ball in x-dir}
vec_normalize(temp, 4000);
phent_addforceglobal(you, temp, spot);
======================================
if i put line1 as
vec_set(temp, vector(0, 1, 0));//(ball moves in y dir)
or
vec_set(temp, vector(0, 0, 1));//(ball moves in z dir)

it is working....

what is wrong?
are there any previous settings that i made wrong?

these are the settings i have put in the action of the ball
=====================================
phent_settype(me, PH_RIGID, PH_BALL);
phent_setmass(me,.06,PH_BALL);
phent_setfriction(me,15);
phent_setelasticity(me,50,200);
phent_setdamping(me,1,1);
=====================================


thanking you all in advance
Manu


Re: can't apply force in X direction!! [Re: cool] #25899
04/10/04 08:16
04/10/04 08:16
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Type should be PH_SPHERE not PH_BALL.

Re: can't apply force in X direction!! [Re: Marco_Grubert] #25900
04/13/04 23:02
04/13/04 23:02
Joined: Sep 2003
Posts: 21
cool Offline OP
Newbie
cool  Offline OP
Newbie

Joined: Sep 2003
Posts: 21

The problem got solved in a somewhat strange way

(1) vec_normalize(temp, magn);

(2)
_______________________________________________________________________________
length = vec_length(temp);
magn = 2000;
vec_set(temp, vector(magn * temp.x / length, magn * temp.y / length, magn * temp.z / length));
_______________________________________________________________________________

I think, both are same, so you I hope....but NOT!!!!!!(1) dosen't work but (2) worked!!!! why? I dont know!!

thanks for reply


Moderated by  HeelX, Spirit 

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