Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Collision hull #158434
10/03/07 12:52
10/03/07 12:52
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Kollisionshülle

First I only posted this thread in german because of my bad english but I could't find a solution so I post this in english now, that more people can help me.


Problem:
I want the collision hull of my model to be the "right" hull (defined by the polygons). That was my code:
Code:
action Drehkreuz()
{
wait(1);
my.eflags &= ~FAT;
my.eflags &= ~NARROW;
my.eflags |= POLYGON;
}


I also tried c_setminmax:
Code:
action Drehkreuz()
{
wait(1);
my.eflags &= ~FAT;
my.eflags &= ~NARROW;
my.eflags |= POLYGON;
c_setminmax(me);
}


I also tried
Code:
action Drehkreuz()
{
wait(1);
c_setminmax(me);
}


but it doesn't work c_setminmax gives the collision hull the right size, but not the right form:

Can anyone help me?

Re: Collision hull [Re: Lukas] #158435
10/03/07 12:57
10/03/07 12:57
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
you need to wait one frame after the model is made and then update your hull based on the settings you chose:

wait (1);
c_updatehull(player,1);


you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: Collision hull [Re: oldschoolj] #158436
10/03/07 13:12
10/03/07 13:12
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Thanks for your quick answer
I already wait one frame after the model is made. And c_updatehull doesn't change anything because c_updatehull(me,1); is the same as c_setminmax(me); but slower.

Re: Collision hull [Re: Lukas] #158437
10/03/07 13:24
10/03/07 13:24
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline
Senior Member
oldschoolj  Offline
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
I don't know if thats true. But regardless, I use c_update to recaculate the size of my mesh after I have attached new entities, or changed the size. I honeslty don't know why it's not working for you, but I wish I could help.


you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: Collision hull [Re: Lukas] #158438
10/03/07 13:37
10/03/07 13:37
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
Quote:

And c_updatehull doesn't change anything because c_updatehull(me,1); is the same as c_setminmax(me)



Actually it's very different. c_updatehull updates the collision hull and c_setminmax only sets the bounding box.

Re: Collision hull [Re: jcl] #158439
10/03/07 13:44
10/03/07 13:44
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Ok...
But why does c_updatehull also create a cube-shaped collision hull and not a cross-shaped like my model looks like?

----

EDIT: http://manual.conitec.net/ac_setminmax.htm
Quote:

If possible, call c_setminmax(my) instead of c_updatehull(my,1) - both give the same result, but c_setminmax will be much faster.



The manual says that both give the same result

Last edited by Lukas; 10/03/07 13:49.
Re: Collision hull [Re: Lukas] #158440
10/03/07 13:56
10/03/07 13:56
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
In my opinion the manual is quiet confusing on this issue.
According to the manual c_setminmax "sets the collision ellipsiod and bounding box coordinates of the entity to it's real proportions". Isnt the collision ellipsoid a collision hull or is the manual wrong here?

Re: Collision hull [Re: Fenriswolf] #158441
10/03/07 14:35
10/03/07 14:35
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
vllt my.polygon = on;
aber ansonsten gibts glaub ich nur solche boxen


Visit:
schwenkschuster-design.de
Re: Collision hull [Re: aztec] #158442
10/03/07 14:38
10/03/07 14:38
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Quote:

vllt my.polygon = on;
aber ansonsten gibts glaub ich nur solche boxen



Bei Lite-C wäre das
my.eflags |= POLYGON;
und das habe ich schon versucht, aber es funktioniert nicht

Re: Collision hull [Re: Lukas] #158443
10/03/07 15:24
10/03/07 15:24
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
set(my,POLYGON) is best in your case
if your model is a static object.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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