collision help

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
spearfire
Posts: 11
Joined: Sat Apr 12, 2008 10:26 am

Post by spearfire »

i have a problem again :( :( :(

my colissions only work for .X files not for .Obj or .3Ds

becaus somehow panda .X exporter for 3Ds max makes my model look destroyed and deformed

could someone help me??
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

nobody knows the answer to my question?

and an other.
can i get the height of the mesh, in a position (for example, for a ladder, i have to know the start height, and the end height, and the center and so on)
only using the collision isn't good, because i want to write my own gravity, and i need the height.
is there any way, or i have to do it by myself?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

somebody pls help me ><
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

I think you can get the height and width of the bounding box of your model. This should do it.

I`m sure someone could help you if you`re more specific, because this:
can i get the height of the mesh, in a position (for example, for a ladder, i have to know the start height, and the end height, and the center and so on)
is quite difficult to understand( I`m not English ).

If you take a look at tutorial 7-Collision and use ellipsoids for the other objects, everything should work just fine. If you already did this, but as you said you go through some objects an collide with air, then check the offset vector- the one that makes you look from the "eyes" of your ellipsoid, not from the "stomach"( check the example ). You may have done sth wrong there. And the triangle selector won`t have any probs with scaled meshes, if you scale them before creating the selector. No clue...
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

hi

nope, it isn't the bounding box..
for example, if the model is round, the bounding box isn't...

hmm... more specific.. do you know arras tiled terrain?
there is a command called getHeight(vector3d).
i tell the pos, where my character is, and it gives me the height. i want something like this :D

and the triangle selector isn't good to me. because i can't get the height with that (i think :D)
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

other idea?
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

B@z wrote:hi

nope, it isn't the bounding box..
for example, if the model is round, the bounding box isn't...

hmm... more specific.. do you know arras tiled terrain?
there is a command called getHeight(vector3d).
i tell the pos, where my character is, and it gives me the height. i want something like this :D


and the triangle selector isn't good to me. because i can't get the height with that (i think :D)
AFAIK it's open source so you can check for yourself how he did it..
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

yeah but the tiled terrain map, and a simple b3d aren't same thing i think :D :D
what worked on tiled terrain, that wont work in a simple model...
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Maybe you can learn the technique and apply it on what you need :wink: .
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

i checked it, but i don't get it, or it's a different system :S
i can't apply it to meshes :S
Mag-got
Posts: 42
Joined: Tue Dec 04, 2007 5:53 pm

Post by Mag-got »

B@z, maybe your collision node is not scaled, you just scaled the model but I think you already solved that. So what point in your model do you want to get, with the bounding box you can get the highest point in the model? And check what it's applied to in the tiled terrain code, apply it to the same in yours
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

i want to get all heights of the red lines in the picture.

Image

i don't use phisic engine, so i have to write gravity by myself.
for that, i have to know where is the floor (terrain->getHeight(character.getPosition()) + [if there is a model in the top of it then] model->getHeight(relative character position))
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

Code: Select all


4
| 3
v | 2
_ v | 1
 |_ v |
   |_ v
     |_
____|
can i get the height of the pos 1,2,3,4?
but not just collide, i have to get the height of it (because of the gravity).
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

pls help me! ><
i can't improve my program without it ><
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

Looks like you want to use a collision response animator and make a meta selector for the level, stairs, etc. Have a look at example 7 in your irrlicht download, or view the tutorial 7 on this website.
Post Reply