How does one rotate objects (like arcs) along the x or y axis?
Like to know, I have an interesting map idea.
-K
How to rotate objects on the x and y axis?
How to rotate objects on the x and y axis?
I can get a positive score; I just choose not to.
Re: How to rotate objects on the x and y axis?
no you can not. you will have to create a mesh to do this.
whats your idea? o.O
whats your idea? o.O
Re: How to rotate objects on the x and y axis?
I think it can, what about the treads in the 'Two Tanks, Laser Sniping' map?
I was thinking something along the lines of a train, probably a steam engine sort of thing.
-K
I was thinking something along the lines of a train, probably a steam engine sort of thing.
-K
I can get a positive score; I just choose not to.
Re: How to rotate objects on the x and y axis?
Actually you can with spin
known as: Tanx, Eoncho, ckw.
Bzflag player since 2001.
Bzflag player since 2001.
- optic delusion
- Special Forces
- Posts: 1052
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: How to rotate objects on the x and y axis?
sure you can. Use spin. You can use it more than once. Do the spin in each axis seperately. I got this out of an old map of mine.
That's not a great way of doing it, because using spin multiple times can change an object's location, as well as it's orientation. It's hard to predict where you'll end up. The easiest way to do it might be..... spin it before moving it.
1. Make the arc so it's center is at point 0 0 0. The center, not the bottom, must be at 0 0 0, so if it's ten units tall, make it's position 0 0 -5.
2. Spin the arc into the rotation you want.
3. Use define and group to shift the arc to it's final location.
Code: Select all
textureMatrix
name tunspin1
spin 0.3
end
material
name tunnel1
specular 0.5 0.5 0.5 1
addtexture title.png
texmat tunspin1
end
arc
position 0 112 0
shift 0 0 397
size 15 15 183
angle 360
ratio 0.03
divisions 32
spin 90 1 0 0 #spins 90 degrees in x
spin 135 0 0 1 #spins 135 degrees in z
texsize 2 1 2 1
inside matref tunnel1
end
1. Make the arc so it's center is at point 0 0 0. The center, not the bottom, must be at 0 0 0, so if it's ten units tall, make it's position 0 0 -5.
2. Spin the arc into the rotation you want.
3. Use define and group to shift the arc to it's final location.
Last edited by optic delusion on Wed Oct 07, 2009 11:24 pm, edited 2 times in total.
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.
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.
-
- Private First Class
- Posts: 1400
- Joined: Sun Feb 06, 2005 5:40 pm
- Location: Somewhere over there.
Re: How to rotate objects on the x and y axis?
You can rotate arcs, meshboxes, meshpyrs, spheres, cones, and meshes using the 'spin' property.
It will not work with normal boxes or pyramids as far as I know.
Spin works as such:
spin angle nx ny nz
where 'angle' is the angle, turning clockwise. nx, ny, and nz are true/false toggles, which change on which axis you rotate the object. if nx is '1', and ny and nz are 0, then you will turn on the x axis. iirc, you can only spin on one axis at a time, which is okay, because you can repeat spin as much as you want.
for example:
Edit: oh hey, looks like someone beat me to it. sadface
It will not work with normal boxes or pyramids as far as I know.
Spin works as such:
spin angle nx ny nz
where 'angle' is the angle, turning clockwise. nx, ny, and nz are true/false toggles, which change on which axis you rotate the object. if nx is '1', and ny and nz are 0, then you will turn on the x axis. iirc, you can only spin on one axis at a time, which is okay, because you can repeat spin as much as you want.
for example:
Code: Select all
meshbox
name yay
shift 0 0 0 #it doesn't move
scale 10 10 30 # it's 10 by 10 by thirty units big
spin 90 1 0 0 # spins 90degrees on the x axis
spin 23 0 0 1 # spins 23degrees on the z axis
spin 45 0 1 0 # spins 45degrees on the y axis.
- optic delusion
- Special Forces
- Posts: 1052
- Joined: Sat Sep 25, 2004 2:29 pm
- Location: Planet MoFo
- Contact:
Re: How to rotate objects on the x and y axis?
wow, 4 other posts while i was editing mine...
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.
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.
Re: How to rotate objects on the x and y axis?
You should be able to spin regular boxes and pyramids as well if you have a new enough bzfs version, but I haven't tested that.