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 (), 18,654 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
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