Parenting a prop_physics to a func_rotating

Any aspects of level design for the Source engine.

Parenting a prop_physics to a func_rotating

Postby Naticus on Sun Aug 12, 2012 3:39 am

There may be another way of doing this but here goes...

I have created models for pieces of a windmill. The models consist of three blades and the nose piece where the blades attach. I successfully created them all as prop_physics. I also developed a system where the player can build the wind mill my placing the pieces near the wind mill pole. They assemble through the use of trigger_teleports and point_teleports. After the pieces are teleported, motion is disabled and they are fixed in place.

I need to parent the assembled pieces to a func_rotating to make the windmill blades spin. The valve wiki states the following under prop_physics
Note: prop_physics can be parented if the 'parentname' value is manually added with smartedit turned off. Parenting prop_physics can be unpleasant and buggy in some situations.


I was able to turn off smartedit and include the Parentname field for each of the pieces. The issue I am running into is that all the pieces are frozen when the level starts. They seem to be already parented to my func_rotating. The func_rotating is triggered to rotate once all the pieces have been assembled. Naturally, I looked to find a "setparentname" through the output dialogue of the trigger I'm using but I did not see "setparentname" as an option and it would not work when trying it manually. Is there another trigger that might contain the setparentname parameter? I'm stumped.

Has anyone else had any success parenting prop_physics? That is where they are used as physics objects first and then parented to something??
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Re: Parenting a prop_physics to a func_rotating

Postby Gary on Sun Aug 12, 2012 4:01 am

Why not instead use prop_dynamics(_override if needed) that start "disabled", then, instead of teleporting and attempting to parent the prop_physics, you kill them. And enable the prop_dynamic.

Note. you still have the prop_physics for building the windmil but they are killed when "attached".
Have a question related to modding or something I posted? Something that needs staff attention? PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Parenting a prop_physics to a func_rotating

Postby Naticus on Sun Aug 12, 2012 4:16 am

Yep that did the trick. Thanks!
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Return to Hammer Editor Help

Who is online

Users browsing this forum: Majestic-12 [Bot]