Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 26,406 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A7 Bowling physics #349676
12/10/10 07:43
12/10/10 07:43
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
I made a code for a bowling ball, everything looks just fine but I want to add curve to it whenever you throw the ball, I already have a code for setting the force and the direction for the ball, take a look at the ball code:


if(set_posforce >= 3)//ig the position and the force are already set then
{
vec_set(me.x,vector(camera.x,camera.y + 100,camera.z-15));
phent_settype(me,PH_RIGID,PH_SPHERE ); // create a ball
phent_setmass(my, 100,PH_SPHERE);
phent_setdamping (me, 10 ,0);
phent_setelasticity(me,30,50);
friction -= force_throw + 20; //set friction depending on the force
friction = clamp(friction,20,100);
phent_setfriction(me,friction);

if(force_throw > 70)//force too high
{
phent_addvelcentral(me,vector(x_direction * 5, (force_throw * 11),0));

}
else
{
phent_addvelcentral(me,vector(x_direction * 2, (force_throw * 15),0));
}

ball_rolling = true;

}



So what do I have to add to get the curve effect?

This is the actual game, thanks for reading.



Edit: here's video showing what I want to achieve

http://www.youtube.com/watch?v=dzp4D_2D2AE


Last edited by Theil; 12/10/10 07:46.
Re: A7 Bowling physics [Re: Theil] #351549
12/26/10 21:25
12/26/10 21:25
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
Wow, you are a skilled coder!
But maby you try A8, that meens PhysX or the PhysX plugin for A7.
But if I could add sounds here, you would hear alot of klaping grin




Moderated by  HeelX, Spirit 

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