Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 04/29/26 18:09
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 4,296 guests, and 26 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ukgamer, valino, juergenwue, VladMak, Geir
19210 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Adjust Capsule collision Type : #365923
03/30/11 11:33
03/30/11 11:33
Joined: Apr 2008
Posts: 2,488
ratchet Offline OP
Expert
ratchet  Offline OP
Expert

Joined: Apr 2008
Posts: 2,488
Well ike said in the manual i can create a Capsule shape
for my character :

ENTITY* shell_right = ent_create("shell2.mdl",vector(-40,53,40),NULL);

pXent_addshape(ceiling, shell_right, PH_CAPSULE);

Ok it's create automatically,
but to avoid a charatcer to have it's foots floating on ground :
It would be cool if we could tweak it or change the center of gravity, for example move it a little up and decrease the size, !

Well i have the solution :
The character model will always follow the cpasule physix,
Caus it's attached to it in some way.
I just have by code to move the character a little down after the physic engine have moved the capsule.

But for changing capsule size, i don't see ?
Perhaps after creation, getting the size by code, and manually tweaking it for recreating the capsule with changed dimension ?

Last edited by ratchet; 03/30/11 11:40.
Re: Adjust Capsule collision Type : [Re: ratchet] #365929
03/30/11 13:15
03/30/11 13:15
Joined: Jul 2000
Posts: 28,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
Frankfurt
I believe you can set up the capsule size through the min_x, max_x vectors. Set the vectors to the desired dimension before creating the shape.

Re: Adjust Capsule collision Type : [Re: jcl] #365943
03/30/11 14:48
03/30/11 14:48
Joined: Apr 2008
Posts: 2,488
ratchet Offline OP
Expert
ratchet  Offline OP
Expert

Joined: Apr 2008
Posts: 2,488
Yes, i think it's the way to go !

I'll try to see if i can make my own visual tool ( in the same way as the visual hitBox editor made by SuperKu ) !

Re: Adjust Capsule collision Type : [Re: ratchet] #372814
06/04/11 16:15
06/04/11 16:15
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
well, I can't get it working:

even with changing the min_z values, my character is still floating above the ground.
I am using a model for the ground, but it shouldn't make a difference?


Check out the throwing game here: The throwing game
Re: Adjust Capsule collision Type : [Re: Roel] #372818
06/04/11 16:45
06/04/11 16:45
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Try to scale the model (scale_z, maybe even x and y, too) before you set its capsule hull, then reset its scale.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Adjust Capsule collision Type : [Re: Superku] #372824
06/04/11 18:13
06/04/11 18:13
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Thank you Superku!
It works!


Check out the throwing game here: The throwing game

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