Flipping Cones

Questions and answers about the how and why of making maps.
Post Reply
User avatar
Sniper752
Private First Class
Private First Class
Posts: 192
Joined: Tue Dec 15, 2009 8:43 pm
Location: TRAVL Headquarters, Orbiting Mars in the year 2236

Flipping Cones

Post by Sniper752 » Thu Jun 14, 2012 3:33 pm

So I looked in the wiki and forums but couldn't find a clear answer... how do you flip a cone upside down?

This is what I want to flip:

Code: Select all

cone
  name Ice_cream_cone
  position 0.000000 0.000000 60.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
end
So I tried this: (like you would a pyramid)

Code: Select all

cone
  name Ice_cream_cone
  position 0.000000 0.000000 60.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
  flipz
end
and this:

Code: Select all

cone
  name Ice_cream_cone
  position 0.000000 0.000000 60.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
  spin angle 0 0 180
end
but nothing worked... :(
[center]::|:|::|Sniper752|::|:|::
Map Maker
Avid Airsofter
Owner: Hosting.BZAddict.net ports 5242 and 5243
Admin: bzsupreme.webarts.bc.ca[/center]

User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Re: Flipping Cones

Post by SkillDude » Thu Jun 14, 2012 3:36 pm

You almost had it. Try this instead:

Code: Select all

cone
  name Ice_cream_cone
  position 0.000000 0.000000 60.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
  spin 180 0 0 1
end
Essentially what you are doing is specifying the angle of the spin first, then you specify the axes it will rotate around as true (1) or false (0) values.

And if you want it flipped, you should probably flip it along the X or Y plane, not the Z plane., which would be spin 180 1 0 0 or spin 180 0 1 0 respectively.

More cone info and properties if you're curious: http://wiki.bzflag.org/Cone

User avatar
Sniper752
Private First Class
Private First Class
Posts: 192
Joined: Tue Dec 15, 2009 8:43 pm
Location: TRAVL Headquarters, Orbiting Mars in the year 2236

Re: Flipping Cones

Post by Sniper752 » Thu Jun 14, 2012 3:42 pm

Thanks! I'll have to modify the wiki later, cause it isn't very clear. But that makes a lot of sense :D
[center]::|:|::|Sniper752|::|:|::
Map Maker
Avid Airsofter
Owner: Hosting.BZAddict.net ports 5242 and 5243
Admin: bzsupreme.webarts.bc.ca[/center]

User avatar
Sniper752
Private First Class
Private First Class
Posts: 192
Joined: Tue Dec 15, 2009 8:43 pm
Location: TRAVL Headquarters, Orbiting Mars in the year 2236

Re: Flipping Cones

Post by Sniper752 » Thu Jun 14, 2012 3:54 pm

hmmm. Now the cone just disappears...

Code: Select all

cone
  name Ice_cream_cone
  position 0.000000 0.000000 65.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
  spin 180 1 0 0
end
[center]::|:|::|Sniper752|::|:|::
Map Maker
Avid Airsofter
Owner: Hosting.BZAddict.net ports 5242 and 5243
Admin: bzsupreme.webarts.bc.ca[/center]

User avatar
SkillDude
Private First Class
Private First Class
Posts: 336
Joined: Sun Apr 01, 2007 4:50 pm
Location: United States

Re: Flipping Cones

Post by SkillDude » Thu Jun 14, 2012 4:04 pm

Observe more closely. At the ground specifically. You chucked your cone at the ground. Just kidding.

But a cone is transformed in the order you specify the parameters. So this is what you did:

Image

Specify your parameters as if the origin contained your transformations. I recommend you do your spins before your shifts. The position parameter behaves strangely, I suggest you use shift and scale to get the desired results, since BZFlag treats the cone object as a mesh:

Code: Select all

cone
  name Ice_cream_cone
  spin 180 1 0 0
  shift 0.000000 0.000000 65.000000
  size 4.000000 4.000000 10.000000
  rotation 0.000000
  matref Ice_cone
end

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests