Getting Caught on Corners

Questions and answers about the how and why of making maps.
Post Reply
User avatar
Triumph of the Soul
Corporal
Corporal
Posts: 294
Joined: Thu Jul 06, 2006 4:32 pm
Location: Minnesota

Getting Caught on Corners

Post by Triumph of the Soul »

I am making a map which involves me hand coding a few meshes in. This has been going well, but I've run into a commonly re-occurring problem: When driving around the corner of a mesh (where two faces are joined) it is easy to get caught and sucked into the mesh, whether I have an inside point or not. Once inside, I can shoot within the mesh (again, having or not having an inside point achieves the same outcome).
Image
Creator @: Duck or Die, Duck or Die CTF, Fuel Stack, Guernica, Normal, Frayed
User avatar
Teppic
Private First Class
Private First Class
Posts: 576
Joined: Mon Mar 07, 2005 10:00 pm
Location: The North Block

Post by Teppic »

Are you re-using the same verts on the corner or defining them once for each face?
Erm, that doesn't read to well, sample code please?
User avatar
Triumph of the Soul
Corporal
Corporal
Posts: 294
Joined: Thu Jul 06, 2006 4:32 pm
Location: Minnesota

Post by Triumph of the Soul »

Code: Select all

mesh
 name 1
 vertex 40 200 0
 vertex 40 40 0
 vertex 200 40 0
 vertex 200 200 0
 vertex 40 200 140
 vertex 40 40 20
 vertex 200 40 140
 vertex 200 200 140
 vertex 40 180 140
 vertex 180 40 140
 face
  vertices 0 1 2 3
  matref sandstone
 endface
 face
  vertices 3 2 1 0
  matref sandstone
 endface
 face
  vertices 4 0 1 5 8
  matref sandstone
 endface
 face
  vertices 8 5 1 0 4
  matref sandstone
 endface
 face
  vertices 1 5 9 6 2
  matref sandstone
 endface
 face
  vertices 2 6 9 5 1
  matref sandstone
 endface
 face
  vertices 8 5 9
  matref sandstone
 endface
 face
  vertices 4 8 9 6 7
  matref sandstone
 endface
 face
  vertices 7 6 9 8 4
  matref sandstone
 endface
 face
  vertices 6 2 7 3
  matref sandstone
 endface
 face
  vertices 3 7 2 6
  matref sandstone
 endface
 face
  vertices 7 3 0 4
  matref sandstone
 endface
 face
  vertices 4 0 3 7
  matref sandstone
 endface
 inside 100 100 70
 smoothbounce
end
For some reason, the same problem doesn't happen when I tested the sample. Instead of getting caught on just the corners, you get stopped wherever you touch it. You don't get sucked in though. If you find anything wrong or that I'm missing anything, that's good, but you may not want to use this as an accurate representation of the problem I stated. I will post the map in 'Works in Progress' soon.
Image
Creator @: Duck or Die, Duck or Die CTF, Fuel Stack, Guernica, Normal, Frayed
User avatar
Tedius
Sergeant First Class
Sergeant First Class
Posts: 142
Joined: Tue Sep 19, 2006 6:10 pm
Contact:

Post by Tedius »

You created an inside version of each of each face, which is not usually a problem. However, in your case it masked the real problem in your 6 2 7 3 face which is not the correct order. Here is a fixed version in which I removed all the unnecessary inside faces:

Code: Select all

mesh
name 1
 vertex 40 200 0 	#0 am I the only one who labels vertices?
 vertex 40 40 0 	#1
 vertex 200 40 0 	#2
 vertex 200 200 0 	#3
 vertex 40 200 140 	#4
 vertex 40 40 20 	#5
 vertex 200 40 140 	#6
 vertex 200 200 140 #7
 vertex 40 180 140 	#8
 vertex 180 40 140 	#9
 face 
  vertices 3 2 1 0 
  matref sandstone 
 endface 
 face 
  vertices 4 0 1 5 8 
  matref sandstone 
 endface 
 face 
  vertices 2 6 9 5 1 
  matref sandstone 
 endface 
 face 
  vertices 8 5 9 
  matref sandstone 
 endface 
 face 
  vertices 4 8 9 6 7 
  matref sandstone 
 endface 
 face #this was the problem face
  vertices 6 2 3 7
  matref sandstone 
 endface 
 face 
  vertices 7 3 0 4 
  matref sandstone 
 endface 
 inside 100 100 70 
 smoothbounce
end
this signature intentionally left blank
User avatar
Triumph of the Soul
Corporal
Corporal
Posts: 294
Joined: Thu Jul 06, 2006 4:32 pm
Location: Minnesota

Post by Triumph of the Soul »

Thanks Tedius, it works just fine now (but of course, you knew that). I actually do label my vertices. I used to do them all in the map file, but it got tiresome, so I label them in my drawings and don't bother in the map file.

Edit: New Question: Let's say I have a mesh that only has one face (FYI: the face is at a slope), but I want it to be visible from above and below. I make an inside and outside face, and driving down the slope works. However, when I turn around to jump up the slope, it acts as if I set _noClimb 1 when it is actually set to 0, and I eventually get sucked in. What should I do?
Image
Creator @: Duck or Die, Duck or Die CTF, Fuel Stack, Guernica, Normal, Frayed
User avatar
Teppic
Private First Class
Private First Class
Posts: 576
Joined: Mon Mar 07, 2005 10:00 pm
Location: The North Block

Post by Teppic »

I've seen this before when you use the same verts to make both faces. Just make it a very thin cube
Post Reply