Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
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 (7th_zorro, dr_panther), 724 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
Jumps and Physics #334082
07/21/10 05:42
07/21/10 05:42
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Hello all,
I set a player as a physics entity:

pXent_settype(me,PH_CHAR,PH_CAPSULE);

as u can see the type is :PH_CHAR
however, when I am moving this character with :

pXent_movechar(me,move_diff , vector(rotate,0,0), 0);

everything is working fine except for the jumping... whatever I set move_diff.z to the player keeps itself on the ground and never jumps or moves up even if I turn the gravity function off.
If I put instead of move_diff a vector with x and y values of move_diff.x and move_diff.y and a z value of 200 the player stay on the ground and if I change this value to 500 the player goes to the ceiling directly ... IDK wut's wrong please somebody help... Am I doing something wrong with ?? How should we set jumps with physics?

Last edited by bk9iq; 07/21/10 07:29.
Re: Jumps and Physics [Re: bk9iq] #334329
07/22/10 15:28
07/22/10 15:28
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Any Help PLZ??

Last edited by bk9iq; 07/22/10 15:29.
Re: Jumps and Physics [Re: bk9iq] #338542
08/18/10 21:58
08/18/10 21:58
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline
Member
Alessandro  Offline
Member

Joined: Sep 2004
Posts: 130
Italy
In CAR.C source code, JCL used this function call to create a lift (to put the car in the right position after it crashed):

Code:
pXent_addforcelocal(car,vector(0,0,3000),vector(0,0,40));



Since that function call let the car make a small jump, I think you can use the same approach.
I hope this will help you!

Re: Jumps and Physics [Re: Alessandro] #340255
09/02/10 15:03
09/02/10 15:03
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
Try it with a invisible exlosion;

pXent_addexplosion (my, 0, 0, 500);




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