Parenting Cubes

Avatar
JoeyGuy917
146 Posts
Posted Dec 06, 2013
Is there any possible way to parent a cube to another cube?
Advertisement
Registered users don’t see ads! Register now!
Avatar
TeamSpen210
608 Posts
Posted Dec 06, 2013
Replied 9 minutes later
You'd want to use a phys_constraint. If that doesn't work, try using a nodraw func_physbox with two prop_dynamic_override cubes parented to it.
Avatar
FelixGriffin
2,680 Posts
Posted Dec 06, 2013
Replied 4 minutes later
You can also use SetParent, but for most purposes you wouldn't need this.
Avatar
RustyDios
154 Posts
Posted Dec 07, 2013
Replied 5 hours later
Can you not just give Cube A a name and then switch off SmartEdit and add the parentname <Cube A name> keyvalue to Cube B ?
Avatar
User
630 Posts
Posted Dec 07, 2013
Replied 2 hours later

RustyDios wrote:
Can you not just give Cube A a name and then switch off SmartEdit and add the parentname keyvalue to Cube B ?

Exactly.

But much better is to parent a prop_dynamic (Cube Model) to a Cube.

Avatar
FelixGriffin
2,680 Posts
Posted Dec 07, 2013
Replied 2 hours later
I can think of a few situations in which parenting a cube would be helpful, mostly if you needed it to move with something else before detaching and becoming physically simulated again. But yeah, you'll almost always get the same effect by parenting a prop_dynamic.
Avatar
ChickenMobile
2,460 Posts
Posted Dec 15, 2013
Replied 8 days later

Have you ever heard of a phys_magnet? Very cool stuff the Source engine has :smile:

https://developer.valvesoftware.com/wiki/Phys_magnet
You can set cubes to be magnetic to each other by setting them to the model of a cube.

EDIT: Probably not completely relevant but cool anyhow

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Dec 15, 2013
Replied 42 minutes later
The only problem with phys_magnets is that they're hardcoded not to be grabbable, regardless of their weight. And you don't want to let them near portals if they won't fit through cleanly.