Legacy:Collision Cylinder

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search

The collision cylinder was the basis of the collision system in Unreal Engine versions up to and including UT. In UT2003, collision is far more complex, but an actor can still be made to use a collision cylinder by setting the property Collision -> bUseCylinderCollision (see Actor/Collision for more).

Definition

A collision cylinder is simply an invisible cylinder, centred on the actor's mesh or icon. In pre-2003 versions, every actor has one. This is how the Unreal engine determines whether actors (players, projectiles, pickup, triggers, decoration, etc) touch each other during play, and when to cause one actor to block another.

Visibility

To see collision cylinders in UnrealEd, check the Viewport Caption Context Menu -> Actors -> ViewRadius item. This setting is independent for each viewport. All selected actors will now display:

  • a cylinder made of dotted red lines in 3D viewports
  • a circle in top 2D view
  • and a rectangle in side and front views (this is the cylinder seen from the side).

Setting Collision Size

The collision cylinder is defined by a height and a radius, set in an actor's collision properties. It is always upright, no matter what the actor's orientation. This is somewhat of a drawback, as it means that some actors do not block properly: for example the pipe decoration when used horizontally can't block realistically. It's up to the mapper to work around this limitation.

Behaviour

Basics

An actor's collision can be set to block others or collide with them.

Block 
An actor which blocks prevents other actors from entering its cylinder. Monsters, bots, players and some kinds of decoration can't be walked into and feel solid to the player.
Collide 
An actor which collides allows other actors to pass through its cylinder, but will be affected by this. For example: a player can walk through a weapon pickup actor. The pickup will make itself disappear and act upon the player to make him receive a weapon. Another example: triggers send out an event to other actors. What happens for both the trigger and the pickup is that the engine calls the Touch() function of the actor.
Neither 
An actor which does neither simply has no effect on other actors which pass through its cylinder. Actors such as Light and ZoneInfo do nothing when another actor passes through them. Some decoration is set to this behaviour, for example the pipe decorations.

Mixed Behaviour

At least one of the actors does not collide or block. 
Nothing is called.
One of the actors collides, the other blocks or collides. 
Both actors have Touch() called.
Both actors block. 
Both actors have Bump() called. Moving actors also have HitWall() called.

Note that behaviour is also dependent on the presence in the actor's class script of Bump() or Touch() functions. Actors such as Light (UT) do not override the base Actor.Touch() function, and therefore nothing happens when a player walks through a light actor, even if flags have been set in the collision properties.

Preset blocking actors

The actors BlockPlayer, BlockActor, BlockAll and new in UT200X, BlockingVolume are simply invisible actors with some of the collision properties set, located under Keypoint in the class tree. They're purely a convenience to the mapper; any other actor can be set to perform the same function.

Ways to work around collision orientation:

  • Use several BlockAll to make a row of cylinders. This may not feel entirely realistic to the player though.
  • prevent the player from touching non-blocking decoration with architecture: eg the solid trim above and below the curved pipes outside the chamber in DM-Pressure.
  • Create level geometry with surfaces set to invisible, and make sure it's hollow.

Related Topics