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
1 registered members (TipmyPip), 18,619 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
Page 2 of 2 1 2
Re: Non-physics entity to physics entity ? [Re: Helghast] #59073
11/17/05 02:01
11/17/05 02:01
Joined: Sep 2004
Posts: 260
UB,Mongolia
Olzii Offline OP
Member
Olzii  Offline OP
Member

Joined: Sep 2004
Posts: 260
UB,Mongolia
Quote:

you should more worry about FPS if everything is ENABLED...




No, i dont think so. Because in my level most AI-cars will be non-physics-car ( no physics entity or partually physics entity or DISABLED physics entity ). When they have collision, i will enable physics for these entities but not longer. After they have collision, they will receive impact from each other. After some time (may be 10 second) they will stop (or i will stop them) and i will DISABLE it again.


The Empire of the Mongols comprised the largest continuous land empire ever, reaching from Korea to Poland
Re: Non-physics entity to physics entity ? [Re: Olzii] #59074
11/17/05 10:23
11/17/05 10:23
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I'd reccomend to discard the physics engine in favour of a c_move/c_trace/c_rotate based solution for your movement. I had nothing but trouble trying to get a vehicle to work right, reason being is that you cannot have midly high poly worlds without there being terrible jittering. This is a confirmed bug to and I have no idea if it would be fixed or not, but that doesn't matter. It took me 1 month and 1 week to completely re-do all the movement and shift all the related systems to it. Honestly, by hand coding it you can put in independant suspesion, powersliding, strafing, and all other manners of movement without being restricted to the barriers of the physics engine.

Heres some code for entity-entity collision:

Code:
  function collide_move()
{
vec_diff(temp,my.x,you.x);
vec_normalize(temp,1500);//strength of force
//vec_add(my.x, temp.x);
c_move(my, nullvector, temp.x, ignore_passable + glide);
vec_diff(temp,my.x,you.x);
vec_normalize(temp,1500);//strength of force
vec_inverse(temp.x);
c_move(you, nullvector, temp.x, ignore_passable + glide);
}



It moves the my and you entities away from eachother. Put it in a while loop with smaller values for each entity and you can simulate a good force. I'd seriously reccomend not disabling and enabling the entities as physics entities just for collision(as this can be easily scripted).

P.S - The only way the physics engine would be good for movement is with a slower moving vehicle on a low poly world. Also, A.I can slow things down alot with physics enabled cars, so don't intend on having large races going on. I'm not trying to be a defeatest here, but please consider what i'm saying, since it really sucks when you find you wasted a couple months monkeying with something that just wont work. Especially when you have a TON of other systems tied into it(turbos, weapons, characters, ect.). But then again, if your a novice coder i'd reccomend first using the physics engine to get your grounds with movement, since you can crank something out very fast with the physics engine(think 1-2 days) in contrast to some very complex hand coding that will take at least a month.

Page 2 of 2 1 2

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