|
Physics
#229959
10/01/08 20:58
10/01/08 20:58
|
Joined: Jul 2008
Posts: 17
12thhellion
OP
Newbie
|
OP
Newbie
Joined: Jul 2008
Posts: 17
|
i finally have a physics entity moving by control but it stops after a certain distance can anyone tell me why?
Last edited by 12thhellion; 10/01/08 20:58.
|
|
|
Re: Physics
[Re: 12thhellion]
#229961
10/01/08 21:14
10/01/08 21:14
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
code? We are not physic , lolz
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: Physics
[Re: Blade280891]
#229962
10/01/08 21:28
10/01/08 21:28
|
Joined: Jul 2008
Posts: 17
12thhellion
OP
Newbie
|
OP
Newbie
Joined: Jul 2008
Posts: 17
|
function movement{ temp.x = my.x + fcos(my.pan,1000); temp.y = my.y + fsin(my.pan,1000); temp.z = my.z; if key_c == 1{phent_addforceglobal(my,temp.x,my.x);} }
action usercontrol{ ph_setgravity (vector(0, 0, -500)); phent_settype (my, PH_RIGID, PH_BOX); phent_setmass (my, 3, PH_BOX); phent_setfriction (my, 10); phent_setdamping (my, 0, 0); phent_setelasticity (my, 50, 20); player = my; while(1){ cam(); movement(); wait(1); } }
|
|
|
Re: Physics
[Re: 12thhellion]
#229964
10/01/08 21:33
10/01/08 21:33
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
where's the rest? as in function main Etc.. Also please use code tags  Can I assume that the car is moving on its own as well without user interaction?
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: Physics
[Re: Blade280891]
#229965
10/01/08 21:37
10/01/08 21:37
|
Joined: Jul 2008
Posts: 17
12thhellion
OP
Newbie
|
OP
Newbie
Joined: Jul 2008
Posts: 17
|
include "user.wdl";
function main{ video_switch(7,0,1); level_load("Testlvl.wmb"); }
function cam{ camera.x = my.x - fcos(my.pan,200); camera.y = my.y - fsin(my.pan,200); camera.z = my.z + 50; camera.pan = my.pan; }
function movement{ temp.x = my.x + fcos(my.pan,1000); temp.y = my.y + fsin(my.pan,1000); temp.z = my.z; if key_c == 1{phent_addforceglobal(my,temp.x,my.x);} }
action usercontrol{ ph_setgravity (vector(0, 0, -500)); phent_settype (my, PH_RIGID, PH_BOX); phent_setmass (my, 3, PH_BOX); phent_setfriction (my, 10); phent_setdamping (my, 0, 0); phent_setelasticity (my, 50, 20); player = my; while(1){ cam(); movement(); wait(1); } }
No but it stops moving after ive pressed c
|
|
|
Re: Physics
[Re: 12thhellion]
#229967
10/01/08 21:41
10/01/08 21:41
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
Ok, it will stop moving after you press it. Also i can't see a problem, in the code but im no expert.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: Physics
[Re: 12thhellion]
#230078
10/02/08 17:16
10/02/08 17:16
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
we cant write it for you, you will need to learn im afraid.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|