KatsBits Community

Game Editing => Video Channel => Topic started by: kat on February 17, 2014, 11:22:14 AM

Title: [RtCW] player clip shaped doors and objects
Post by: kat on February 17, 2014, 11:22:14 AM

Scenario
To add interest to a level or area within, doors and other brush-based conditional structures can be shaped in various ways, to distinguish areas or functions for example, rather than their being left flat shapeless blocks.

Problem
When using shaped structures for conditional items such as doors (e.g. func_door) and other brush-based movable objects (e.g. func_script_mover), the player can become stuck on protruding or indented elements resulting in doors or other func_script_mover objects inadvertently killing the player (doors if set to 'crusher') or 'hanging' until the player can extricate themselves from the item in question.

Solution
Combine a clip volume (or other 'player' restrictive clip volume) with the entity to prevent the player from getting accidentally hung on a conditional object. The volume should encompass the entire item so draw a volume in Radiant to conform to the general 'bounding box' volume of the item (or cut it to shape). Once done right-click and combine or "Move into entity".
Title: Re: [RtCW] player clip shaped doors and objects
Post by: ratty redemption on February 17, 2014, 12:36:19 PM
i understand the concept, although surprised that particular moving object needed a clip hull? are all idtech engines that prone to the players or npc's getting stuck?

off topic: did you receive the email i sent yesterday?
Title: Re: [RtCW] player clip shaped doors and objects
Post by: kat on February 17, 2014, 08:05:08 PM
It's not the engine causing the problem as such, it's the structure of the brushwork (objects design). They don't expressly need to be clipped, doing that just avoids the player getting stuck where they normally wouldn't during typical game-play. As an example, the player can get stuck in the indentation of the door shown in the video, which kills them (the door is a crusher) because they are impeding the doors progress - the entity interprets this as the player being in the way. To avoid this a playerclip brush is added to the entity.

There is an added bonus of doing this too, the door can be a 'non-solid' model (better smoothing/smooth grouping), the clip prevents hang-ups and clips the general volume of the object (the clip can be included as part of the model but the resulting object still needs a brush volume for key/value assignment of the model (file path).

In Radiant (brushwork)
(https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-radiant_med.jpg) (https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-radiant.jpg)

In Blender (imported and fixed meshes -/+ collision)
(https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-blender_med.jpg) (https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-blender.jpg)
(https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-blender-collision_med.jpg) (https://www.katsbits.com/images/tutorials/rtcw-sp-editing/shaped-doors-blender-collision.jpg)
Title: Re: [RtCW] player clip shaped doors and objects
Post by: ratty redemption on February 17, 2014, 08:20:17 PM
understood, i think. if the model was exported from blender with a clip material (corresponding to the materials used in the level editor) could a nodraw brush of any size be used to contain the key data?
Title: Re: [RtCW] player clip shaped doors and objects
Post by: kat on February 17, 2014, 08:55:35 PM
Any brush volume would do, assuming normal use, i.e. it not being seen. So yes typically nodraw, trigger or a clip of some kind (weapon if impacts are needed), assigned the "model2/[file path]" key/value pairing. If you did want a model to appear in-game its origin point needs to be  properly positioned in Blender relative to said-same in Radiant - depending on the entity, if it makes use of an 'origin' volume to mark a point of rotation etc, the model would spawn relative to that.
Title: Re: [RtCW] player clip shaped doors and objects
Post by: ratty redemption on February 17, 2014, 09:28:39 PM
cool and i vaguely remember using origin brushes as part of func_doors.