Jump up boxes
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Jump up boxes
What sort of editing do I have to do to a box to make it so you can jump up but wont fall down
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
Like the platforms in boxy wars
Re: Jump up boxes
Its called a one way mesh. Use the mesh below and experiment with different textures on faces / drivethrough on faces.
Code: Select all
mesh
position 0 0 10
size 10 10 1
vertex -1 -1 0
vertex 1 -1 0
vertex 1 1 0
vertex -1 1 0
vertex -1 -1 1
vertex 1 -1 1
vertex 1 1 1
vertex -1 1 1
face
vertices 0 1 5 4
endface
face
vertices 1 2 6 5
endface
face
vertices 2 3 7 6
endface
face
vertices 3 0 4 7
endface
face
vertices 0 1 2 3
drivethrough # bottom face
endface
face
vertices 4 5 6 7
endface
end
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
Should I make the side faces drivethrough too?
- Cobra_Fast
- Dev Monkey
- Posts: 322
- Joined: Sat Oct 07, 2006 11:51 am
- Location: Germany
- Contact:
Re: Jump up boxes
thats personal choice. whether you want it to be passable from the sides or not ...
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
I put in the code and I think I did it correctly but it doesn't show up when i test the map. I am testing the map in 3.0.0 alpha if that could be the problem.
Code: Select all
mesh
name mesh1
position 250 140 9
size 20 150 1
vertex 270 215 10
vertex 270 215 9
vertex 230 215 10
vertex 230 215 9
vertex 230 65 10
vertex 230 65 9
vertex 270 65 10
vertex 270 65 9
face
vertices 1 2 4 3
endface
face
vertices 1 2 8 7
endface
face
vertices 3 4 6 5
endface
face
vertices 5 6 8 7
endface
face
vertices 8 6 4 2
drivethrough # bottom face
endface
face
vertices 1 3 7 5
endface
end
Re: Jump up boxes
2.99/3.0 is not the problem here
first remove "position" and "size" as these do not belong inside a mesh object
second add a matref to the mesh, so you can see the faces your defining
finally, recheck you vertices and faces as I don't think you've got what you are expecting
first remove "position" and "size" as these do not belong inside a mesh object
second add a matref to the mesh, so you can see the faces your defining
finally, recheck you vertices and faces as I don't think you've got what you are expecting
BZFlag ROCKS!!!
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
it is not that I can't see them its that it is nonexistant
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
I found out that the issue was when you shift it it shifts by number of meshes not in meters
-
- Private First Class
- Posts: 1400
- Joined: Sun Feb 06, 2005 5:40 pm
- Location: Somewhere over there.
Re: Jump up boxes
Vertices start at 0, not 1. So your mesh won't work. Downshift all your numbers by one and it should show up.
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
alright I have it all food but why can't I see the drive through sides even when I have a matref set
Re: Jump up boxes
Maybe if you showed us the updated code...?
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
don't mind the sixes. It was 5/3 that I needed but bzflag wasn't accepting the fraction.
Code: Select all
mesh
shift
1.6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
7 9
scale 150 20 1
vertex -1 -1 0
vertex 1 -1 0
vertex 1 1 0
vertex -1 1 0
vertex -1 -1 1
vertex 1 -1 1
vertex 1 1 1
vertex -1 1 1
face
vertices 0 1 5 4
matref red
endface
face
vertices 1 2 6 5
matref red
endface
face
vertices 2 3 7 6
matref red
endface
face
vertices 3 0 4 7
matref red
endface
face
vertices 0 1 2 3
drivethrough # bottom face
matref roof
endface
face
vertices 4 5 6 7
matref roof
endface
end
-
- Private First Class
- Posts: 1400
- Joined: Sun Feb 06, 2005 5:40 pm
- Location: Somewhere over there.
Re: Jump up boxes
You most likely have the vertices for the bottom face backwards (Currently you made a mesh face facing upwards, not down)
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
theres a difference?
Re: Jump up boxes
Yes, meshes are one sided. They only exist when viewing them from one side, from the otherside there is nothing there.
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
boxy didn't seem to have an issue like this though. can you explain why?
Re: Jump up boxes
try
A) reversing the order of the bottom face vertices 3 2 1 0 (changes the winding direction)
or
B) adding normals to the mesh
A) reversing the order of the bottom face vertices 3 2 1 0 (changes the winding direction)
or
B) adding normals to the mesh
Code: Select all
material
name red
diffuse 1.0 0.0 0.0 1.0
end
material
name roof
diffuse 0.3 0.3 0.3 1.0
end
define obj_1
mesh
vertex -1 -1 0
vertex 1 -1 0
vertex 1 1 0
vertex -1 1 0
vertex -1 -1 1
vertex 1 -1 1
vertex 1 1 1
vertex -1 1 1
normal
face
vertices 0 1 5 4
matref red
endface
face
vertices 1 2 6 5
matref red
endface
face
vertices 2 3 7 6
matref red
endface
face
vertices 3 0 4 7
matref red
endface
face
vertices 3 2 1 0
drivethrough # bottom face
matref roof
endface
face
vertices 4 5 6 7
matref roof
endface
end
enddef
group obj_1
scale 150 20 1
shift 1.667 7 9
end
group obj_1
scale 150 20 1
shift -200 7 9
end
BZFlag ROCKS!!!
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
so runic what did u do in that code? I like using the shift in the mesh kinda. what is this normal and its i reverse the order of the bottom won't the invisible spot be on top then?
Re: Jump up boxes
I like using define and group sorry
Yes it would then be invisible from above, but not the top face it would be visible as only the bottom face was flipped
every vertex used in the face can also reference a 3D normal, think of it as a pointer or direction the face is facing.
but you don't have to use them
bzflag will guess which way the face is facing based on it's winding direction
Yes it would then be invisible from above, but not the top face it would be visible as only the bottom face was flipped
every vertex used in the face can also reference a 3D normal, think of it as a pointer or direction the face is facing.
but you don't have to use them
bzflag will guess which way the face is facing based on it's winding direction
BZFlag ROCKS!!!
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
I figured it out thank you guys. I added another face under the bottom one. Thanks for telling me
Re: Jump up boxes
Just want to clarify one thing
Scale and Shift are the preffered method of moving and changing meshes but position and size work too
Actually, they do.Runic wrote:first remove "position" and "size" as these do not belong inside a mesh object
Scale and Shift are the preffered method of moving and changing meshes but position and size work too
Re: Jump up boxes
if they work for you, then fine, but i don't see "position" and "size" listed as part of the mesh object in the bzw man page or the Mesh wiki page
BZFlag ROCKS!!!
-
- Private First Class
- Posts: 113
- Joined: Sun Dec 02, 2007 8:21 pm
Re: Jump up boxes
it is nto an attribute for mesh and it came up as an error on mine but I had other stuff wrong when I was trying it too so those might have also messed it upRunic wrote:if they work for you, then fine, but i don't see "position" and "size" listed as part of the mesh object in the bzw man page or the Mesh wiki page