Skip to content

Ghost node #2714

@omichel

Description

@omichel

It is often useful to represent a ghost of an object, such as a robot, to display a target position or several keyframe positions.
Such ghosts should be visible from the main 3D view, but probably not from the robot cameras.
In order to facilitate the display of such ghosts, we could introduce a new node in Webots: the Ghost node which would inherit from Transform, adding a transparency field and maybe a visibility field to enable/disable the visibility from robot cameras. Hence the Ghost node would add the following fields compared to Transform:

Ghost {
  SFFloat transparency 0.5
  SFBool  visibility   FALSE
}

In addition to this node, we should probably also add some supervisor API function that will allow users to easily create Ghost nodes from other nodes:

wb_supervisor_field_insert_ghost_from_node(WbFieldRef field, int position, WbNodeRef node)

That will allow a supervisor controller process to easily create a ghost in a children list (which may be at root level) from an existing robot, sensor, actuator, solid, transform or group. Then the translation, rotation and scale fields inside the Ghost could be changed by the supervisor if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureImplementation of a major feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions