A7 c_move() Collision bug? German/English

Posted By: Nikozu86

A7 c_move() Collision bug? German/English - 03/20/09 15:19

Hallo zusammen.
3DGS A7.6

Ich habe durch Zufall einen heiklen Bug entdeckt.
Sobald ich in WED ein Haus-Modell(.mdl) um mehr als 90 Grad drehe, funzt die c_move-Kollisionsabfrage nicht mehr korrekt. Der Player geht durch die Wände! c_trace() erkennt jedoch die polygon-genaue Form.
J,a das Haus hat my.polygon = on; & my.passable = off.

So blöd bin nun auch wieder nicht. :-)

Sobald ich das Haus wieder in die Rotate = 0,0,0 setze (in WED!), funzt Alles tip-top!
Kann also nicht am Script liegen.

---------------------
Hi Folks!
I found a Collision bug from c_move().
When i rotate any house-model (.mdl) more than 90 degrees IN WED, build and run, sometimes the player can walk/run through the house!
C_trace() works good.
When i set the rotation from the house back to 0,0,0 degrees (in WED!) build and run it, everything works perfect again.
So, it`s not my programming-fault!

And yes, the house has My.polygon = on; and My.passable = off;

My brain is still working :-D

I`m using A7.66.4

Posted By: Quad

Re: A7 c_move() Collision bug? German/English - 03/20/09 15:52

your bounding box is not set.

add c_setminmax to your horse's action,and see its your fault.
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/20/09 18:15

They are all setted. :-(
This is a "House" not a "horse"! :-D

in the player`s action

c_setminmax(me)
my.min_x/Y/Z
my.max_x/Y/Z
All are set.

and the house has the polygon-flag set. I Need Polygon based Collision for the House.

Thanks for helping me!
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/20/09 18:18

!! I`m Rotating the in WED !!!
Build and run...

I forgot to say that.
Sorry! :-D
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/21/09 16:28

I ubdated to A.7.7
And still have the problem... :-(
Posted By: MrGuest

Re: A7 c_move() Collision bug? German/English - 03/22/09 01:22

what parameters are you using for c_trace and c_mode?
is your house a model or blocks?
are you sure you're rebuilding the level and not just updating entities or similar?

an insight into your code will probably show the problem
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/23/09 15:47

Please watch this Video...

http://www.youtube.com/watch?v=xv11wtLQ0Ko


First RUN, no problem.
Than...
The only thing i changing is the angle(Rotate) of the box....
Now you see the problem...
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/23/09 17:49

Here the C_MOVE-Code for the Entitys:

c_move(me,vector(my.x_force*time_step ,my.y_force*time_step, 0),vector(0,0,0), IGNORE_PASSABLE|GLIDE); //

HOUSEs Code
The Most part of this action handles Shadow and visible of the house.

action GAYA_HAUS2
{
//my.push = 99;
my.passable = off;
my.polygon = on;
//my.ambient = -12;
my.material=haus_mat;

while(1){
if(vec_dist(my.x,player.x) >4000)
{my.invisible = on;}
else
{my.invisible = off;}

if(vec_dist(my.x,camera.x) <1000)
{my.shadow = on;}
else
{my.shadow = off;}


wait(1);
}
}

------------------------------------------
It`s not the Code`s error!
It`s the engine.
I`ve the trouble only when i change the Angle of the house/Box - Modells
more than 90 Degrees in WED (see Video-link above).
If i`m seting the Pan-Angle back to zero, it works perfect again.
Posted By: XD1v0

Re: A7 c_move() Collision bug? German/English - 03/23/09 18:04

Nikozu86 Lite-C or C-script?
if you using Lite-C dont set flags this way, use set()
Code:
set(my, POLYGON);

Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/23/09 18:59

It`s WDL (C-Script) and i`m using A7.7 now.

I repeat again:
I`ve got the trouble !ONLY! when i change the Angle of the house/Box - Modells
more than 90 Degrees in WED (see Video-link).
http://www.youtube.com/watch?v=xv11wtLQ0Ko
If i`m seting the Pan-Angle back to zero, it works perfect again.


Posted By: Cowabanga

Re: A7 c_move() Collision bug? German/English - 03/24/09 14:24

Originally Posted By: Nikozu86
Please watch this Video...

http://www.youtube.com/watch?v=xv11wtLQ0Ko


Can you share the hanging code? Thanks in advance. smile
Posted By: Michael_Schwarz

Re: A7 c_move() Collision bug? German/English - 03/24/09 16:14

gib dem haus folgende action:

action house()
{
my.polygon=on;
wait(1);
c_updatehull(me, 1);
}
Posted By: Nikozu86

Re: A7 c_move() Collision bug? German/English - 03/24/09 18:06

Hi Cowabanga,
Sorry, i will not share this Code yet...


Hallo Michael Schwarz,
Hab`s versucht, bringt auch nix :-((

1.es hatt "nur" die Bounding box.
2. der Player und die Gegner kommen immernoch durch.

Ich werde mich wohl noch viele, viele Male wiederholen müssen...
Bis endlich mal Jemand einsieht, dass es nicht am Code, sondern an der Engine liegt....*seufz*
....
Erst wenn ich das Haus um "MEHR als 90 Grad" gedreht habe, funzt die Collision nicht mehr einwandfrei. Bie 45 Grad funzt alles noch!
Ich habe sechs Monate gebraucht, bis ich das "durch Zufall" herausgefinden habe! 6 Monate!
Im Video habe ich das Haus (die Box) um 180Grad gedreht. Da funzt es fast gar nicht mehr... :-(

Ich wüsste schon eine Notlösung:
Jedes Model 4 mal im MED erstellen, für jede Ausrichtung ein Modell.
Eine Andere Lösung fällt mir jetzt nicht ein...
Posted By: pararealist

Re: A7 c_move() Collision bug? German/English - 03/29/09 13:49

I would post it in developers forum as you seem not to be getting any joy.
© 2024 lite-C Forums