Map Bug: Problem with ground plane, meshbox with spin

NOTE: this is an informal bug post place ONLY. Real bugs should be posted on GitHub
Post Reply
F687/s
Private First Class
Private First Class
Posts: 369
Joined: Sun Dec 31, 2006 8:30 pm

Map Bug: Problem with ground plane, meshbox with spin

Post by F687/s »

Well, an semantics bug triggered a map which triggered a bzflag bug which triggered a bug report.

But anyway...

When I run the following bzfs code:

Code: Select all

meshbox
	name platform1
	position 0.0 0.0 15.0
	size 15.0 200.0 1.0
	spin 45.0 1.0 0.0 0.0
end
...the box ends up cutting through the ground plane, so it can be seen through the grass. My question is: should this happen? If this does not work on your machine, I can attach a screenshot of what happens on my machine.

Thanks for your help.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

The ground plane is not clipping, it never has been ( it's for speed reasons on software rendering systems). So yes it is "suposed" to happen. Don't make any geometry bellow Z 0.
ImageJeffM
User avatar
Peter
Private First Class
Private First Class
Posts: 354
Joined: Tue Jan 23, 2007 5:44 pm
Location: 127.0.0.1
Contact:

Post by Peter »

Or you can have objects below z 0, but just add this code to stop it from happening...

Code: Select all

material
  name grass
  texture std_ground
end

meshbox
  position 0 0 0
  size 400 400 0.1 #change the 400's to fit your world size
  rotation 0
  matref grass
end
Note: You have to have "-sb" in your options otherwise you'll be spawning in the air.
“Roses are #FF0000, violets are #0000FF, all of my base are belong to you.” ~ Nerd on Colour
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

that does not solve the problem, it only masks it.
That is also very wastefull of faces.
ImageJeffM
User avatar
Tedius
Sergeant First Class
Sergeant First Class
Posts: 142
Joined: Tue Sep 19, 2006 6:10 pm
Contact:

Post by Tedius »

F687/S, you have a 200 unit long box and you are spinning it on the x-axis, like an airplane propellar. Perhaps you'd get the results you expect if you spun it on the z-axis like:

Code: Select all

   spin 45.0 0.0 0.0 1.0 
or alternatively, you may find it more easier to use the rotation parameter instead:

Code: Select all

   rotation 45.0 
this signature intentionally left blank
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1054
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion »

/me chuckles knowingly. Wait until you try ((nested) spin) transformations. You are prabably better off moving to a full-fledged 3-D editor, right now.
Why wait?
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

Try rotating the object first. Then position it. The order of transformations is important. Also as Tedius pointed out, the spin of 45 degrees is about the X axis and the Y length is 200 units. This will cause the object to rotate below the ground. Not sure what you're trying to end up with here.

Try looking at this:
http://kapsi.fi/jpa/stuff/bzw/transformations.php
F687/s
Private First Class
Private First Class
Posts: 369
Joined: Sun Dec 31, 2006 8:30 pm

Post by F687/s »

> F687/S, you have a 200 unit long box and you are spinning it on the x-axis, like an airplane propellar. Perhaps you'd
> get the results you expect if you spun it on the z-axis like:


I know that, and I did reset it to spin on the Z-axis after I found out what was wrong. My problem was whether the ground plane was supposed to clip it off (which it doesn't).

> /me chuckles knowingly. Wait until you try ((nested) spin) transformations.
> You are prabably better off moving to a full-fledged 3-D editor, right now.
> Why wait?


Do you mean Blender, or BZEdit?

Sorry this turned into a full-fledged discussion about object rotation.
User avatar
joevano
General
General
Posts: 1863
Joined: Sat Jun 18, 2005 1:08 pm
Location: South Bend, Indiana, USA

Post by joevano »

F687/s wrote:Sorry this turned into a full-fledged discussion about object rotation.
No need to apologize, I am finding it interesting. :)
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
Post Reply