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
1 registered members (AndrewAMD), 1,248 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Move a object under the physics #216611
07/17/08 20:39
07/17/08 20:39
Joined: Mar 2008
Posts: 104
theDust Offline OP
Member
theDust  Offline OP
Member

Joined: Mar 2008
Posts: 104
Hi, when i try to move my object (a box) with c_move and physics it doesn't move. I have found the function "phent_addforceglobal". How does this work ?

Re: Move a object under the physics [Re: theDust] #216651
07/18/08 05:18
07/18/08 05:18

M
mercuryus
Unregistered
mercuryus
Unregistered
M



...like adding a directed force to the objects (e.g. kick a ball).
Depending on friction, gravitation, ... the object moves/collides until it stops.

->Physic forum

Re: Move a object under the physics [Re: ] #216720
07/18/08 12:57
07/18/08 12:57
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
when your object is defined as physics object you cant move it with c_move. you'll need to use something like this:
phent_addforceglobal (player, nullvector, vector(20,0,0)); // it should move left



Ubi bene, ibi Patria.
Re: Move a object under the physics [Re: croman] #216727
07/18/08 13:39
07/18/08 13:39
Joined: Mar 2008
Posts: 104
theDust Offline OP
Member
theDust  Offline OP
Member

Joined: Mar 2008
Posts: 104
Ok, i have tried phent_addvelcentral, phent_addforceglobal and all the others and there are working but wrong. I have a player that moves forward and backward with the up and down-key in relation to the rotation of the player. When i hit the left or right-key the player rotates without moving and when i hit up and down it moves in that direction. And c-move was perfect for that. Any solution ?

Edit:
Hmmm...i think i didn't need the physics for my player. But it's a jump & run...the player must fall when he don't has a ground under him. And he should jump wink Can i code this behavior without physics ?

Last edited by theDust; 07/18/08 15:00.
Re: Move a object under the physics [Re: theDust] #216803
07/18/08 21:16
07/18/08 21:16
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
offcours you can do that without physics. actually it's almost always done without it. try to search for gravity scripts on this forum



Ubi bene, ibi Patria.
Re: Move a object under the physics [Re: croman] #216823
07/18/08 22:31
07/18/08 22:31
Joined: Mar 2008
Posts: 104
theDust Offline OP
Member
theDust  Offline OP
Member

Joined: Mar 2008
Posts: 104
Thx for the help, i'll search it smile


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