Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Prevent the car of flipping over in curves #54896
09/14/05 21:38
09/14/05 21:38
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Hi.
I am trying to prevent my cars of flipping over in curves, when in high-speeds. I am using this:
Code:
 
if(plCar01_entity.roll>8) { phent_addtorquelocal (plCar01_entity, vector(-20000 , 0, 0)); }
if(plCar01_entity.roll<-8) { phent_addtorquelocal (plCar01_entity, vector(20000 , 0, 0)); }



And the car doesn't flip, but it doesn't look good. The car starts to shake as if it has cold.
Will it be that anybody has a better way?

Re: Prevent the car of flipping over in curves [Re: XNASorcerer] #54897
09/14/05 22:37
09/14/05 22:37
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Temporaraly disable the physics engine, ent_move it back into place, re-engage the engine.

Re: Prevent the car of flipping over in curves [Re: fastlane69] #54898
09/14/05 22:44
09/14/05 22:44
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
fastlane69, this is a solution for after the accident. To put the car back on the track. What I mean is how can I prevent the accident?

Re: Prevent the car of flipping over in curves [Re: XNASorcerer] #54899
09/14/05 23:28
09/14/05 23:28
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
- Increase Gravity
- Limit Steering while traveling faster
- Add a downwards force on the vehicle upon turning at high speeds

By doing these things you wont have this problem anymore.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Prevent the car of flipping over in curves [Re: William] #54900
09/14/05 23:40
09/14/05 23:40
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
I just switch from PH_SPHERE to PH_POLY and result was very good. The car almost doesn't flip anymore. Now I only need to make it slide upon turning.

Re: Prevent the car of flipping over in curves [Re: XNASorcerer] #54901
09/15/05 00:46
09/15/05 00:46
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
ROFLMAO

You never mentioned you where using ph_ball to model a car! Is it any wonder it flips (or better stated "rolls") over ?

As to my solution, the principle is the same whether used for an accident or for minor or major flip corrections.

Last edited by fastlane69; 09/15/05 00:47.
Re: Prevent the car of flipping over in curves [Re: fastlane69] #54902
09/15/05 01:08
09/15/05 01:08
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline
User
Carloos  Offline
User

Joined: Mar 2005
Posts: 514
Brazil
In Newton is very rare to flip the car the way u talking, only when I pass in a accidented area in high speeds.

Re: Prevent the car of flipping over in curves [Re: Carloos] #54903
09/15/05 01:09
09/15/05 01:09
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline
User
Carloos  Offline
User

Joined: Mar 2005
Posts: 514
Brazil
Are you making a racing game ?

Re: Prevent the car of flipping over in curves [Re: fastlane69] #54904
09/15/05 01:13
09/15/05 01:13
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
ph_ball? I was using ph_sphere.

phent_settype(my, PH_RIGID, PH_SPHERE);
phent_setmass(my, 30, PH_POLY);

But I cannot keep using this, because the car explodes sometimes.

Re: Prevent the car of flipping over in curves [Re: Carloos] #54905
09/15/05 01:14
09/15/05 01:14
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil

Last edited by Sorcerer; 09/15/05 01:24.
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

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