Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using the Sensor Volume Component

This tutorial is going to examine the will help you in setting up a sensor volume component. The sensor volume could also be called triggercan also act as a trigger, whenever another sensor volume hits or passes the current sensor volume, it will send execute an event that it was triggered by something. This can for example trigger. For example, it can be used to create a door trigger , whenever the a player walks into that sensor volume, the door could open or close on contact. I would also recommend to see the Entity It is recommended to refer the Entity Components - Components Panel 1 documentation to understand or look up what the behavior of specific attributes do.First

To use a Sensor Volume Component

In this tutorial, we are going to create an a new entity and add the a sensor volume to it. Click

  1. Open a level in the CRYENGINE Editor, and then click on the

...

  1. Empty Entity

...

  1. icon in the

...

  1. Create Object

...

  1. panel

...

  1. to place

...

  1. an empty entity in the level.

...

  1.  

  2. Select the entity and click on the

...

  1. Add Component

...

  1. button in the

...

  1. Properties

...

  1. panel, and then select

...

  1. SensorVolume option.

Creating an empty entity and add the sensor volume.


  1. Image Modified

  2. Now, you can see the

...

  1. Entity component has a shape assigned to it. This shape will

...

  1. act as a trigger area

...

  1. for that component. You can switch between a box or a sphere

...

  1. by clicking on the

...

  1. Shape

...

  1. attribute and then select the desired shape

...

  1. .

...

  1. You can

...

  1. also modify the size or radius of the shape

...

  1. using the Size attribute box. 

    Image Modified

Changing the size of the shape.

  1. Image Modified

...

  1. You need to add tags to

...

  1. the SensorVolume. Tags are

...

  1. labels that you can set to your sensor volume to

...

  1. assign more attributes. For example, you don't want to receive an event every time something

...

  1. triggers the sensor volume, you maybe just want to only listen to

...

  1. a tagged player. 

  2. To add Tags to the SensorVolume, click on the Attributes menu and then select Add in the context menu. After that, you should be able to see a new

...

  1. attribute field. Now, you can select

...

  1. a predefined tag that needs to be assigned to this sensor volume. You can have as many tags as you

...

  1. desire.

    Image Modified

...

  1. Image Modified

...


  1. The Tags works similar to a Listener attribute. The Listener

...

  1. determines the attribute that it needs to listen

...

  1. which means if

...

  1. another sensor volume

...

  1. with a defined tag makes a contact with the current sensor volume you are going to

...

  1. receive an event. For example, you have set a campfire and you want to only listen to entities

...

  1. that are flammable. You can have multiple listeners or none

...

  1. if you don't want to receive any events.  

    Info

    You can also have multiple sensor volumes with different attributes on the same entity.