2 registered members (AndrewAMD, 7th_zorro),
923
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Collision question
#271218
06/11/09 19:57
06/11/09 19:57
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
OP
Serious User
|
OP
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
Hello Everyone, I am trying to use the sword demo style of code, from AUM12(I think ) in my game. It works as so: When player is in his attack frames, the sword traces from the tip of the blade, to the hilt; and if result!=0 and if you!=null, you.health -= sword power. it works, but only if im hitting near its x position; not its animated frame position. how do i set it up so that my enemies will be able to be hit anywhere? Hope thats descriptive enough http://i149.photobucket.com/albums/s69/sdsdinc/SWORDPROBLEMO.pngthanks for you time.
Last edited by DevoN; 06/11/09 20:06.
|
|
|
Re: Collision question
[Re: DLively]
#271240
06/11/09 22:40
06/11/09 22:40
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I take it you are using "c_trace" when checking from blade tip to hilt? Add USE_POLYGON to the c_trace mode flags and I think it will solve the issue.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Collision question
[Re: DLively]
#271248
06/12/09 00:52
06/12/09 00:52
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
It seems, historically, only polygons from an ENTITY's first frame were detected when using c_trace + USE_POLYGON. Expanding and contracting the ENTITY's bounding box quickly and properly might work. Of course, the problem might not be fully understood here. Derived from some version of some manual.
my.frame = n;
vec_for_min(my.min_x, my);
vec_for_max(my.max_x, my);
..and served up for no apparent reason.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|