|
0 registered members (),
631
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Collision hull
#158434
10/03/07 12:52
10/03/07 12:52
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
 
Programmer
|
OP
 
Programmer
Joined: May 2007
Posts: 2,043
Germany
|
KollisionshülleFirst 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
oldschoolj
Senior Member
|
Senior Member
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: Lukas]
#158437
10/03/07 13:24
10/03/07 13:24
|
Joined: Aug 2005
Posts: 390 Florida
oldschoolj
Senior Member
|
Senior Member
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: 27,967 Frankfurt
jcl

Chief Engineer
|

Chief Engineer
Joined: Jul 2000
Posts: 27,967
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: aztec]
#158442
10/03/07 14:38
10/03/07 14:38
|
Joined: May 2007
Posts: 2,043 Germany
Lukas
OP
 
Programmer
|
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 
|
|
|
|