how can I spin, or rotate a func_instance in game
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?
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.
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?
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.
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 