how can I spin, or rotate a func_instance in game

Avatar
BenVlodgi
633 Posts
Posted Jul 14, 2011
In Hammer for Portal 2...
I want to be able to spin, or rotate a func_instance, around an axis in game.
I tried making a phys_motor, but I can only get that to rotate a func_physbox, is there a way that I could parent my func_instance to my func_physbox, or somehow just rotate my func_instance?
Advertisement
Registered users don’t see ads! Register now!
Avatar
Soundlogic
169 Posts
Posted Jul 14, 2011
Replied 38 minutes later
Parent the stuff in your func_instance to a http://developer.valvesoftware.com/wiki/Func_rotating.
Avatar
Marlovious
111 Posts
Posted Jul 14, 2011
Replied 3 hours later
Parenting an instance can be somewhat tricky since their names change when the map is compiled.

1: Set the instance fixupname to something unique which wont be confused with other entities. IE: "myinstance001" and entity name fixup as prefix.
2: Make sure everything in side the instance is named (no world brushes). These names don't really matter.
3: Create a logic_auto in your map and set output to (onmapspawn, myinstance001, setparent, nameoffunc_rotating)
notice the wildcard (
) after the instance name. On compile, all entities will be renamed to (instance fixup name)-(entity name). So an entity in the instance named "start_up_relay", will be renamed to "myinstance001-start_up_relay"
4:Rotate away. If you plan on rotating when the map starts, leave a small delay after mapspawn.

Avatar
BenVlodgi
633 Posts
Posted Jul 18, 2011
Replied 3 days later

Marlovious wrote:
Parenting an instance can be somewhat tricky since their names change when the map is compiled.

1: Set the instance fixupname to something unique which wont be confused with other entities. IE: "myinstance001" and entity name fixup as prefix.
2: Make sure everything in side the instance is named (no world brushes). These names don't really matter.
3: Create a logic_auto in your map and set output to (onmapspawn, myinstance001, setparent, nameoffunc_rotating)
notice the wildcard (
) after the instance name. On compile, all entities will be renamed to (instance fixup name)-(entity name). So an entity in the instance named "start_up_relay", will be renamed to "myinstance001-start_up_relay"
4:Rotate away. If you plan on rotating when the map starts, leave a small delay after mapspawn.

Okay, that worked out pretty good, except I do need to rotate a room walls included, the only way I can think around this, is if I turn every brush into a physbox, and rotate those with a motor, I dont really want to have to do that, so is there another way?

Avatar
Rubrica
305 Posts
Posted Jul 18, 2011
Replied 1 hour later
Can't you just change the walls into func_brushes?
Avatar
Marlovious
111 Posts
Posted Jul 18, 2011
Replied 4 hours later

Rubrica wrote:
Can't you just change the walls into func_brushes?

This.

BenVlodgi wrote:
Okay, that worked out pretty good, except I do need to rotate a room walls included, the only way I can think around this, is if I turn every brush into a physbox, and rotate those with a motor, I dont really want to have to do that, so is there another way?

Which is why I said -

Marlovious wrote:
2: Make sure everything in side the instance is named (no world brushes).

I should edit that to say, " Make sure everything in side the instance is named, all brushes should be func_brushes.

Advertisement
Registered users don’t see ads! Register now!
Avatar
BenVlodgi
633 Posts
Posted Jul 18, 2011
Replied 3 hours later

Marlovious wrote:
Rubrica wrote:

Can't you just change the walls into func_brushes?

This.

BenVlodgi wrote:

Okay, that worked out pretty good, except I do need to rotate a room walls included, the only way I can think around this, is if I turn every brush into a physbox, and rotate those with a motor, I dont really want to have to do that, so is there another way?

Which is why I said -
Marlovious wrote:

2: Make sure everything in side the instance is named (no world brushes).

I should edit that to say, " Make sure everything in side the instance is named, all brushes should be func_brushes.

Awesome, thanks, I'll try it now :smile: