Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,416 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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