Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/15/26 08:28
Alternative to Stooq for Zorro S
by Petra. 10/14/26 07:04
Stooq now requires an API key
by cwford. 10/08/26 23:27
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Volkovstudio), 15,172 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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