Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Physicobject-move question #295657
10/26/09 18:52
10/26/09 18:52
Joined: Jul 2008
Posts: 2,101
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,101
Germany
Edit: Sry...this post would better fit in the physic-section
Hi!

I want to make a "ball" physic object which flys away from the camera/player (fex when a key is pressed). Like hes kicking a ball away, or throwing something.

Any tips ? Never moved an physicobject manualy before, thats why im asking.

Thanx for all kind of tips

Edit: Im not asking for commands to do this, im more asking for the logic behind it.

Last edited by rayp; 10/26/09 19:00.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Physicobject-move question [Re: rayp] #295692
10/26/09 21:44
10/26/09 21:44
Joined: Jul 2008
Posts: 2,101
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,101
Germany
I cant get this to work...can somebody explain me the

phent_addforceglobal ?
maybe aum ?

This is my try-code:
Code:
var ball_grav[3] = 0,0, -386;

function _Physic_Ball()
{
   vec_set(my.x, camera.x);
   vec_set(my.pan, camera.pan);
   vec_to_angle(my.pan, camera.pan);

   phent_settype( my, PH_RIGID, 0);
   phent_setfriction(my, 30);
   phent_setmass(my, 10, PH_BOX); 

   vec_set( temp, ball_grav);
   vec_scale( temp, -3 * 10); 
   phent_addforceglobal(my, vector(30*time,0,0), temp);

WAIT(1);
}

}


function _Gen_Ball()
{
 ENT_CREATE("granate.mdl", CAMERA.POS, _Physic_Ball);
}
on_u _Gen_Ball;



Dont really know what im doing grin

Last edited by rayp; 10/26/09 21:52.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Physicobject-move question [Re: rayp] #295695
10/26/09 22:04
10/26/09 22:04
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
look in the demo folder of 3dgs, theres a demo there that does exactly that

Re: Physicobject-move question [Re: darkinferno] #295696
10/26/09 22:12
10/26/09 22:12
Joined: Jul 2008
Posts: 2,101
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,101
Germany
Can u post the code? I think i have deleted such folders...


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

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