Page 1 of 1

(q4) Rotating Entities

Posted: Sun Jan 01, 2006 11:29 pm
by Geit
I'm trying to mirror my base in a CTF map by rotating it by 180 degrees, but the entities don't really rotate along properly. Is there anything to do about this or will I have to code my own tool?

Posted: Sun Jan 01, 2006 11:31 pm
by pjw
Hit Ctrl-R for alternate rotation modes--one of those should rotate everything together nicely...origin I think.

Posted: Sun Jan 01, 2006 11:42 pm
by Geit
Ah, worked like a charm, thanks :)
I would have almost written my own mirroring tool ;)

Posted: Sun Jan 01, 2006 11:48 pm
by primaltheory
To make a mirror of somthing the easy way
(top down)
flip y, rotate z twice...works with most everything

Posted: Mon Jan 02, 2006 12:41 am
by pjw
Edit: My answer was too vague and misleading--pay attention to Sensei Squirrel below. :)

Posted: Mon Jan 02, 2006 12:47 am
by Geit
Well, entities still get messed up using the alternative way, just not as badly.
But maybe it would be worthwile to code a little tool that does the mirroring clean and neat.

Posted: Mon Jan 02, 2006 1:39 am
by KungFuSquirrel
Entities with angle settings should not be rotated - spawns, pickups, etc. Some will rotate ok, but the angle settings will get nuked; you'll have to remove the "rotation" key from them and re-set the angles. Any func_statics or brush entities will work fine, using the method mr. pjw outlined above.

Lights aren't good when rotated; if you rotate combined lights they'll explode in ways you never thought possible :o

We wrote a python script (and by we, I mean lunaran) while we were working on Tremors to flip and mirror entities all speedy-like; it handles entities with angles, too... (anything but combined lights, really). If he gets around to making a more polished/flexible version, we'll see about releasing it.

Posted: Wed Jan 04, 2006 11:56 am
by skwas
Try my tool and tell me what it doesn't do ok (it was designed for Q3).

http://www.fileplanet.com/87762/80000/f ... X-:::-v2.0

I haven't really dived into D3/Q4 matters and thus have no clue about what's new in mapfile format, entities, and the like... If it doesn't work 100% but the changes/issues are easily addressible, I may consider adding support. (I must add I am very limited in my time)

[edit: if D3/Q4 uses brush primitives, then forget about this tool]

Posted: Wed Jan 04, 2006 11:24 pm
by Johnny Law
Lunaran, save us!

Quick someone put up the LunaranSignal!

P.S. Do we have what's necessary to build plugins for the built-in editor? (I'm at work surfing during a compile or I guess I could go dig through the SDK to see if there's something in there.) My CTF map is going to need a mirror rather than a rotate, and I had thrown together a GtkRadiant plugin for doing that at one point...

Posted: Wed Jan 04, 2006 11:57 pm
by primaltheory
If you select alot of things you can just go flip Y rotate z twice...works fine for me...

Posted: Thu Jan 05, 2006 2:34 am
by pjw
primaltheory wrote:If you select alot of things you can just go flip Y rotate z twice...works fine for me...
Trust me. It will break stuff if you do that with half a CTF map. Really. Promise.

Edit:
Johnny Law wrote:My CTF map
Ooooooh. Cool. :)

Posted: Thu Jan 05, 2006 6:10 am
by Johnny Law
skwas wrote:[edit: if D3/Q4 uses brush primitives, then forget about this tool]
It is different from Q3 formats so you'll probably be out of luck. I'm not sure what's going on with the texture coordinates, but it appears that each plane is defined by a normal vector from the origin, and I don't think the Q3 format did things that way.
pjw wrote:
Johnny Law wrote:My CTF map
Ooooooh. Cool. :)
Hee! Well, it's stronnnngly "based on" q3wcp15 layout- and entity-wise (cause I don't have a team of CTF playtesters around handy, among other reasons) so it's not brand spanking new. New architecture etc. tho, which is really eating me alive.

Posted: Thu Jan 05, 2006 9:58 am
by Oeloe
Johnny Law wrote:Hee! Well, it's stronnnngly "based on" q3wcp15 layout- and entity-wise (cause I don't have a team of CTF playtesters around handy, among other reasons) so it's not brand spanking new. New architecture etc. tho, which is really eating me alive.
Good choice! cp9 can rot in rail whore hell. :icon34:

Posted: Sat Jan 07, 2006 6:02 am
by skwas
Johnny Law wrote:
skwas wrote:[edit: if D3/Q4 uses brush primitives, then forget about this tool]
It is different from Q3 formats so you'll probably be out of luck. I'm not sure what's going on with the texture coordinates, but it appears that each plane is defined by a normal vector from the origin, and I don't think the Q3 format did things that way.
Yeah I figured. I remember looking at a D3 mapfile format some time ago. It was using brush primitives (which was experimental years back).

However, it still should work on entities only, iow. save all entities to empty map, run it through the tool and done. You still have to manually flip/rotate the brushes in the editor.

Anway, if I have time in a mnth or so, I could have a look and rewrite the mapparser to support primitives... The rest of the format is the same (patches/ents). Unless noone cares :p