Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (AbrahamR, 7th_zorro, dr_panther, 1 invisible), 702 guests, and 6 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
PhysX Questions #337754
08/13/10 06:05
08/13/10 06:05
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Hello all,

I usually don't post any question here in this forum but after I read " If your questions aren't answered elsewhere " below the "Ask The Developers" forum, I decided to ask here since I posted these questions in the other forums but got no answer.... sorry if it is the wrong place....

I made a simple physics code and used pXent_movechar(..) to move my player... However, I am having some problems here...

1-
I made an elevator as a physics kinematic object... I used pXent_kinematic ( entity, var active );
and moved it using pXent_moveglobal ( entity, VECTOR* vMove, ANGLE* aRotate);
However, the physics player doesn't move up and down or sideways with the moving elevator if I keep the player standing on it (( The elevator gets through the body of the player)) but If I walk or run on the elevator while it is moving up then everything works fine and the player moves up... ...
When I don't use physics I can solve it by making the player.z = elevator.z+100; but now I can't use xyz to move the player cuz I am using physics...
and I am using :
pX_setccd ( 1 ); in my main function and pXent_setccdskeleton(my, nullvector, 1); in my actions...
is there any way to fix this??

2-
Also, when I want to make my player jump up, it doesn't move up until my mov.z value becomes 393 and above ... when I try mov.z +=2; and use the debugger I could see that the player doesn't start to move up for any value under 393 and then when it becomes 393 it jumps up really fast to this value... is this a bug or I am doing something wrong?

Thanks


Last edited by bk9iq; 08/13/10 06:26.
Re: PhysX Questions [Re: bk9iq] #337787
08/13/10 10:25
08/13/10 10:25
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Both solutions are the same as for non-physics, just with pXent_movechar instead of c_move. Move the player upwards when on an elevator, and also for jumping. I can't tell you why it jumps wrong, though. Maybe the gravity is too high. You can look into the many walking examples in AUM or on the resource page - most contain jumping code.

http://manual.3dgamestudio.net/pXent_movechar.htm


Moderated by  old_bill, Tobias 

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