3 registered members (Konsti, AndrewAMD, 1 invisible),
1,376
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Collision detect ion
#133538
06/03/07 16:49
06/03/07 16:49
|
Joined: Jun 2007
Posts: 43 Montréal
Julientdc
OP
Newbie
|
OP
Newbie
Joined: Jun 2007
Posts: 43
Montréal
|
Hello, I want to detect the colision of my entity with all others objects in my world. I have see this: scan_entity() Code:
limite_pos.z=0.1; limite_pos.pan=180; limite_pos.tilt=180; objet_cam.enable_scan = on; peuxbouger = scan_entity(objet_cam, limite_pos); str_for_num(valeur_affiche,peuxbouger); texte_fonte.string=valeur_affiche;
but this return the value 0 all the time! How I can detect colision with a value? Thank you, Julien
|
|
|
Re: Collision detect ion
[Re: tompo]
#133540
06/03/07 20:16
06/03/07 20:16
|
Joined: Jun 2007
Posts: 43 Montréal
Julientdc
OP
Newbie
|
OP
Newbie
Joined: Jun 2007
Posts: 43
Montréal
|
Thank you for your respond
I have try c_scan That work for entity but not for block..
peuxbouger = c_scan(objet_cam.x,objet_cam.pan,vector(120,0,40),IGNORE_ME); and peuxbouger = c_scan(objet_cam.x,objet_cam.pan,vector(120,0,40),SCAN_ENTS | IGNORE_ME);
IGNORE_ME Ignores the my entity; can be combined with SCAN_ENTS. IGNORE_YOU Ignores the you entity; can be combined with SCAN_ENTS. SCAN_ENTS Scans for entities within the cone, and triggers their EVENT_SCAN event. SCAN_POS Scans for camera positions placed in the level. SCAN_PATHS Scans for path start positions. SCAN_NODES Scans for path node positions.
Can you help me yet?
Thank you, Julien
|
|
|
Re: Collision detect ion
[Re: Julientdc]
#133541
06/03/07 20:41
06/03/07 20:41
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
True... because C-scan can "see" thrue the walls (blocks) use c_trace or my.enable_block = on; with if(event_type == event_block) or don't use blocks but ents Personally I don't like blocks and don't use them at all
Never say never.
|
|
|
Re: Collision detect ion
[Re: tompo]
#133542
06/03/07 23:25
06/03/07 23:25
|
Joined: Dec 2005
Posts: 252 MyOwnKingdom
nipx
Member
|
Member
Joined: Dec 2005
Posts: 252
MyOwnKingdom
|
not sure, but arent you looking for a collision system for moving, rotating....? then you should use c_move and c_rotate.... nipx
|
|
|
Re: Collision detect ion
[Re: nipx]
#133543
06/04/07 00:30
06/04/07 00:30
|
Joined: Jun 2007
Posts: 43 Montréal
Julientdc
OP
Newbie
|
OP
Newbie
Joined: Jun 2007
Posts: 43
Montréal
|
Hmm Thank you but all this functions is not what I need... I want just a function of this style: result = Collision(object_vector,object_angle,max_vector,max_angle); if oject vector - max_vector = -number then result: 443435435 else result: 0 This: Code:
here 0 | object in map here : 435435 can't continue me > . here 0 | object in map here : 432423 can't continue here 0 | object in map here : 135652 can't continue
c_move: this detect collision but the entity is not in my control with my movement system C_scan: Nice but only entity c_trace: That not work good... with my movement system Thank you, Julien
Last edited by Julientdc; 06/04/07 00:32.
|
|
|
Re: Collision detect ion
[Re: Xarthor]
#133545
06/04/07 07:37
06/04/07 07:37
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
exactly... what movement system do you have, becouse this is strange what exactly you want to do... show us some part of the script or tell us what are you planning and result of c_scan is 0 if nothing or distance to closest you entity if any, so can't you replace blocks with entitys and problem will be solved? BTW... it's a pity that c_scan always scans through walls, not only with some mode like ignore_blocks
Last edited by tompo; 06/04/07 07:46.
|
|
|
Re: Collision detect ion
[Re: tompo]
#133546
06/04/07 12:26
06/04/07 12:26
|
Joined: Jun 2007
Posts: 43 Montréal
Julientdc
OP
Newbie
|
OP
Newbie
Joined: Jun 2007
Posts: 43
Montréal
|
It's just my own movement system and c_move use the physic engine then that interfer with my system...
Ok, I think I will try to use only entity bescause c_scan is perfect.
Just a question, c_scan look only the position of the entity or all the entity?
Thank you, Julien
Last edited by Julientdc; 06/04/07 12:27.
|
|
|
|