Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,244 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
collision box #254385
03/02/09 21:58
03/02/09 21:58
Joined: Aug 2008
Posts: 49
V
Vyse220 Offline OP
Newbie
Vyse220  Offline OP
Newbie
V

Joined: Aug 2008
Posts: 49
This is a big problem, i can't manipulate the collision box of one entity.
I wanna the collision detection for every points of the enemy's model, but it's only in the middle.
I tried FAT and NARROW, but it doesn't work (still too mutch tiny)
What should i do?

Re: collision box [Re: Vyse220] #254447
03/03/09 14:46
03/03/09 14:46
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Set the "polygon" flag for that entity.

Re: collision box [Re: George] #254455
03/03/09 15:04
03/03/09 15:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
or try setting c_setminmax(entityname); AT LEAST one frame after creation.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: collision box [Re: EvilSOB] #254457
03/03/09 15:25
03/03/09 15:25
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
yes, you will he happy as you would see the results of c_setminmax(entityname); wink


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: collision box [Re: VeT] #254461
03/03/09 15:39
03/03/09 15:39
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
@George:
I have seen this a couple of times in your AUM code snippets but I have to disagree: The polygon flag is a bad choice for animated and/or moving entities.
As does the manual clearly state in the remarks section:
Quote:

Only one of the objects involved in a collision should have a polygonal hull. Do not set this flag for moving objects or for animated models.

http://www.conitec.net/beta/aentity_polygon.htm

Afaik JCL once said that using the polygon flag on moving and/or animated models may cause unforeseeable results in collision detection and thus should only be used for static environment objects (not moved by c_move).

Re: collision box [Re: Xarthor] #254475
03/03/09 17:20
03/03/09 17:20
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
I've never had any problems with the polygon flag. From what I know, you can run into trouble only if 2 very complex models have their polygon flag set and run into each other - they could get stuck, but you can avoid this through coding.

Re: collision box [Re: George] #254480
03/03/09 18:00
03/03/09 18:00
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Ok good to know, thanks George!

Re: collision box [Re: Xarthor] #254485
03/03/09 18:16
03/03/09 18:16
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
No problem. Let me know if you ever run into trouble with "polygon" and I'll try to help you.

Re: collision box [Re: George] #254702
03/04/09 21:07
03/04/09 21:07
Joined: Aug 2008
Posts: 49
V
Vyse220 Offline OP
Newbie
Vyse220  Offline OP
Newbie
V

Joined: Aug 2008
Posts: 49
I've tryend both setminmax and plygon, but the result is the same, the collision in detecten only in the center of the model.
Quote:
action DNAnemy
{
my.ambient = -100;
while (player == null) {wait (1);}
my.z = player.z; // set the same height for the enemy ships and the player
var shuttle_speed;
my.skill10 = 2;
my.skill40 = 5; // I'm a ship
my.enable_impact = on;
my.event = destroy_them;
c_setminmax(me);
shuttle_speed.x = global_speed;
shuttle_speed.y = 0;
shuttle_speed.z = 0;
my.skill1 = 1 + int(random(70));
while ((my.x > -800) && (my.skill10 > 0))
{
move_mode = ignore_you + ignore_passable;
ent_move (nullvector, shuttle_speed);
my.tilt += 5*time_step;
wait (1);
}
ent_create(explosion_pcx, vector(my.x, my.y, my.z), animate_explosion);
wait(10);
ent_create(explosion_pcx, vector(my.x, (my.y + 110), my.z), animate_explosion);
ent_create(explosion_pcx, vector(my.x, (my.y - 110), my.z), animate_explosion);
ent_create(dnapart_mdl, vector(my.x, (my.y + 110), my.z), dna_part);
ent_create(dnapart_mdl, vector(my.x, (my.y - 110), my.z), dna_part);
ent_remove(me);
}

There's something wrong here?
With f11 i see the box on all the model, but the collision is still only in the centre of the model

Re: collision box [Re: Vyse220] #254723
03/05/09 00:30
03/05/09 00:30
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Do you have : my.trigger_range = 100;

in your code?

Ottawa smile

Page 1 of 2 1 2

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