Passable models

Posted By: Kronomanta

Passable models - 10/11/08 18:08

Hi All!

I've made a model with 3DS Max, exported it as .3ds.
It works well except one thing...
It's passable... I do not flagged it passable and use no script to make it passable...

I do not know why but all of my models made by me are passable :S

Please, someone, help me :S
Posted By: laugheazy

Re: Passable models - 10/12/08 02:45

Im not 100% sure on this. But is there a way to set its collision detection ? If so you may wanna look into that. I know from other engine experience, or even working with 2D you need to make sure collisions are set.
Posted By: Tails01

Re: Passable models - 10/12/08 05:14

hmm, where do you import it, in WED or MED and then WED, when you import your model in WED, you import it as a WED Block and this could be your Problem try to import it in MED and then WED when you havn't done it yet.

Gruß Tails
Posted By: Kronomanta

Re: Passable models - 10/12/08 12:44

I import in MED then WED.

Hmm... But sample models are not passable as default.. :S
Collision detection? Do you mean setting it via script or checking "on" the polygon flat?

I have tried to use the polygon flat but then my model gets in an invisible box. I mean e.g. I cannot get to an inner corner in the garden.
Posted By: EvilSOB

Re: Passable models - 10/12/08 14:07

It may be aa big hassle, but I struck this problem too.
I could only get around it by setting polygon ON for the models
and compiling with "create meshes" in advanced compile settings turned ON.

Best of luck, and be prepared for many warnings during compiles.
Posted By: Kronomanta

Re: Passable models - 10/12/08 21:33

I got no warning during compiles.
But my model which is a park with a garage and some lamps, is in a box, I think it's called bounding box and I cannot get in neither the park...

I set the polygon ON and checked the 'create meshes'.
Can my model be wrong? I do not know why :S
Posted By: EvilSOB

Re: Passable models - 10/13/08 13:05

That would be my 'guess', a faulty model.

The bounding box you normally see in WED is just so you can see the models
maximum dimensions, it doesnt actually exist.

Try testing by putting your player-start position inside the box in a
valid place and see if everything 'inside' collides ok.

If it does, there may be some hidden bounding box built into the model.
Open the model in MED, and zoom the 3d view right out. Any bounding boxes
will show here if they exist.

If you know how to post files here, post an untextured copy of your park model.

Posted By: szigibence

Re: Passable models - 10/13/08 15:59

Hi all!

Me and kronomanta made the model.
Here is the link :
Code:
http://data.hu/get/723468/park.rar.html

Posted By: Kronomanta

Re: Passable models - 10/13/08 16:06

I put the player-start pos into the box... but my player starts lifting to the top of my entity...
I made the gravity with c_trace, so I think that's why it does the lifting.


I looked at the 3D view in MED but there's no bounding box :S
Szigibence has uploaded the model mentioned...
I hope, seeing it will help :S
Cause we cannot use any of our models :S all of them have this problem :S
Posted By: EvilSOB

Re: Passable models - 10/14/08 09:11

Model contains no problems of the type you describe.
(you may have dynamic lighting issues later due to open meshes though)

I DLed the model, straight import to MED, saved, and loaded as entity
in WED into a pre-existing test level of mine, and set polygon flag on.

It works fine here, I cant get into the park cause of its wall, and cant
get into garage as there are no doors, but Im able to hug the walls
right the way around, and if I place my start inside its all cool.

The problem is somewhere else....

How are you adding the model to WED?
Object / Add_Model, Object / Load_Entity? (same thing)
or as a prefeb or terrain?
Posted By: Kronomanta

Re: Passable models - 10/14/08 14:19

I use Load_Entity.
That huge building is not a garage, it's a warehouse. smile

In case you put the player-start pos to the park surrounded by the walls, can you walk in the park?
Normally as it would be a simpla block??

I do not use any dynamic lights, just the 'SUN'.


Moreover, when you are outside the whole park, can you get to the corner between the wall of the warehouse and the wall of the park?

What do you use for the gravity? c_trace or something else?
Cause I use
Code:
c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);

for movement and
Code:
trace_mode = ignore_me+ignore_passable+use_box;

for handling gravity.

Do you think the problem is here?

Actually, I use a modified movement code of Kingdom Hearts laugh
But just the movement code laugh
Posted By: testDummy

Re: Passable models - 10/14/08 16:01

old manual reference:
c_move
USE_AABB
Quote:

Use an axis aligned bounding box (AABB) for collision, rather than an oriented bounding box (OBB). The AABB system is faster, but ignores the entity orientation on USE_BOX, treats models and sprites as boxes, and requires a BSP level. See collision for the difference between both systems.

*treats models and sprites as boxes
*requires a BSP level
AABB might be quicker than OBB and ent_move might be quicker than c_move with AABB.
OBB, c_move, c_trace, c_rotate only for model only (non-BSP) levels!?
Posted By: EvilSOB

Re: Passable models - 10/14/08 21:21

Originally Posted By: Kronomanta
That huge building is not a garage, it's a warehouse. smile
Ahh, OK, I get it now.

Originally Posted By: Kronomanta
In case you put the player-start pos to the park surrounded by the walls, can you walk in the park?
Normally as it would be a simpla block??
I can walk around inside fine, and can enter the little shed-thing in the middle. The shed behaves perfectly for polygon
collisions. ie can walk into-under-backout fine and its 'poles' are solid and un-passable as they should be.

Originally Posted By: Kronomanta
I do not use any dynamic lights, just the 'SUN'.
You shouldnt have a problem then.

Originally Posted By: Kronomanta
Moreover, when you are outside the whole park, can you get to the corner between the wall of the warehouse and the wall of the park?
Yes, outside of model was perfect polygon collisions too.

Originally Posted By: Kronomanta
What do you use for the gravity? c_trace or something else?
Cause I use
Code:
c_move(my,nullvector,my.move_x,use_aabb | ignore_passable | glide);

for movement and
Code:
trace_mode = ignore_me+ignore_passable+use_box;

for handling gravity.
My testbed is primitive and has NO gravity, everything glued to the floor.
But my movements is controlled by "c_move(my, p_dist_travelled, nullvector, GLIDE);"

Originally Posted By: Kronomanta
Do you think the problem is here?
Yes I think so. You are using BOX collision detections, AABB instead of OBB, like TestDummy said.

I would suggest replacing your lines of code with
Code:
c_move(my,nullvector,my.move_x,ignore_passable | glide);   //movement
...
trace_mode = ignore_me+ignore_passable;                    //gravity 

Let us know how it goes.
Posted By: Kronomanta

Re: Passable models - 10/15/08 14:50

I replaced the code... but nothing happened..
Please, have a look at my player.wdl.
It contains everything from gravity to movement.

Code:
http://utech.extra.hu/tanulas/player.wdl


I've got out of the ideas :S

Posted By: EvilSOB

Re: Passable models - 10/15/08 20:43

Ive DL'ed the script, but cant see anything obvious with the naked eye.
It will have to wait till I get home from work tonite to crowbar it into
my testbed level to see whats up.

I'll let you know.
Posted By: EvilSOB

Re: Passable models - 10/17/08 06:03

Got him, simple enough error, leaving in obsolete code when converting away from other obsolete code.

Just change the begining of the handle_gravity function as follows
Code:
FUNCTION handle_gravity()
{
   result = c_trace(vector(my.x,my.y,my.z - my.z_offset),vector(my.x,my.y,my.z - 4000),ignore_me+ignore_passable);
   IF (result < 3) {
   ...etc...

Worked fine for me, even though I couldnt get jump to work.
I have only solved the "bounding box" problem you had, I havent checked any deeper than that.
Best of luck.
Posted By: Kronomanta

Re: Passable models - 10/17/08 18:33

YEAHHHH, We Love You XD
It works fine wink except the jumping... but I'll solve it wink at least I'll try to solve it laugh

Posted By: EvilSOB

Re: Passable models - 10/17/08 20:17

Hehe, as someone in this forum once said,
"The best way to make a character jump is to
sneak up behind him and shout 'BOO!'" wink

Hope this helps.
Posted By: Kronomanta

Re: Passable models - 10/18/08 19:06

Hehe laugh He was right wink
It's absolutely true :D:D
Posted By: Kronomanta

Re: Passable models - 10/20/08 15:09

Ahh... I'm suffering because of the jumping....
I dont know where the mistake is :S
Evilsob, would you check it out if I ask you?

I've run out of my ideas :S

Posted By: EvilSOB

Re: Passable models - 10/20/08 16:34

Yeah, I'll take a look, no promises though. smile


[edit] Ahhh, my brain is melting....
I dont think I will be able to help, its just too complex. Possibly over-complex.
If you can list and describe the meanings of the movement_modes and
the jumping_modes it may help, but it dont look good.
Posted By: Kronomanta

Re: Passable models - 10/21/08 16:50

Originally, I need a GTA-like controlling system...
and that's the reason I chose the modified Kingdom Hearts code.

But now... I tried to underestand and change how it's needed to be...
So, maybe I'll write a whole new movement system :S using the current camera system.
Posted By: EvilSOB

Re: Passable models - 10/22/08 02:51

probably worth while, the existung system seems overly complex
to re-us if its someone elses.
Posted By: Kronomanta

Re: Passable models - 10/27/08 21:06

Yeah, finally I did it wink
I can jump perfectly wink

If someone is interested I'll share the code wink
© 2024 lite-C Forums