Collision Cylinder
The collision cylinder was the basis of collision detection in Unreal Engine versions up to and including UT. In UT2003, collision is far more complex, but an actor can 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 the cylinder 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
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, and will be affected by this. For example: weapon pickups make themselves disappear and act upon the player to make them receive a weapon. Triggers send out an event to other actors.
What happens for both the Trigger and the weapon 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. Some decoration is set to this behaviour, for example the pipe decorations. Actors such as Light and ZoneInfo do nothing when another actor passes through them. (check: do they even display a cylinder in UEd in this case???)
Mixed behaviour
The current hypothesis is this: actors can be neutral, colliding or blocking (is there any point in colliding + blocking?).
- neutral + neutral: nothing is called
- colliding + ( colliding or blocking ) : both actors have Touch() called
- blocking + blocking : both actors have Bump() 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.
question for the l33t
What happens when a blocking actor (eg player) walks into a colliding actor eg Trigger? Trigger.Touch() is called, but is Player.Bump() called or Player.Touch() ?
Haral: Player.Touch() is called. I am not certain if Bump() would be called as well, but I doubt it.
Preset blocking actors
The actors BlockPlayer, BlockActor? and BlockAll 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.
Related Topics
- Actor/Collision, Actor (UT)/Collision: collision properties explained
- Collision Detection
- OCD
- General Scale And Dimensions