Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,254 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Collision Boxes #130306
05/17/07 05:33
05/17/07 05:33
Joined: May 2006
Posts: 69
Canada
L
Leaf Offline OP
Junior Member
Leaf  Offline OP
Junior Member
L

Joined: May 2006
Posts: 69
Canada
Hey, I have imported a large .mdl file and whish to change the CollsionBox to a polygon CollsionBox so that it conforms to the model. I have some screen shots of what I've done but havn't got it working yet.

http://www.virtualxistance.com/images/poly1.jpg

http://www.virtualxistance.com/images/poly2.jpg

Maybe I have checked the wrong box?

or

Do I need to write a script file to activate the PolygonCollison?

Heres the source on it:

ACTION enemy_dummy {
my.shadow = on;
my.entity_type = 2;
my.enable_scan = on;
my.polygon = on;

WHILE (1) {
IF (my.hit_by_player == 1) {
my.move_x = player.move_x;
my.move_y = player.move_y;
my.move_z = player.move_z;

// move_mode = ignore_passable | glide; //replace c_move with these 2 lines in versions of gamestudio below 6.4
// ent_move(nullvector,my.move_x);
c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);


IF (player.animblend == blend || player.animblend < attack_a || my.animblend > attack_f) { my.hit_by_player = 0; }
}
IF (player.animblend >= stand && target_enemy == my && player_lock_on == 0) && (player.animblend < attack_a || player.animblend > attack_f) { target_enemy = null; }
IF (target_enemy == my && vec_dist(my.x,player.x) > 200) { target_enemy = null; }
wait(1);
}

}


}

Last edited by Leaf; 05/17/07 08:27.
Re: Collision Boxes [Re: Leaf] #130307
05/17/07 18:06
05/17/07 18:06
Joined: May 2006
Posts: 69
Canada
L
Leaf Offline OP
Junior Member
Leaf  Offline OP
Junior Member
L

Joined: May 2006
Posts: 69
Canada
Bump, still need help

Re: Collision Boxes [Re: Leaf] #130308
05/18/07 12:53
05/18/07 12:53
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hi,

Quote:

c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);



To use the entity's polygonal shape for collision you have to remove the 'use_aabb' flag, i think.


Gamestudio download | chip programmers | 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