how can I spin, or rotate a func_instance in game
Quote from BenVlodgi on July 14, 2011, 1:36 pmIn 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?
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?
Quote from Soundlogic on July 14, 2011, 2:15 pmParent the stuff in your func_instance to a http://developer.valvesoftware.com/wiki/Func_rotating.
Parent the stuff in your func_instance to a http://developer.valvesoftware.com/wiki/Func_rotating.
Quote from Marlovious on July 14, 2011, 5:53 pmParenting 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.
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.
Quote from BenVlodgi on July 18, 2011, 12:26 pmMarlovious 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?
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?
Quote from Marlovious on July 18, 2011, 5:52 pmRubrica 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.
This.
Which is why I said -
I should edit that to say, " Make sure everything in side the instance is named, all brushes should be func_brushes.
Quote from BenVlodgi on July 18, 2011, 9:38 pmMarlovious 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
This.
Which is why I said -
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 ![]()
