Skip to content

add Hull special texture #95

Description

@azur-wolve

There are cases where don't want a en entity to generate collision, due it being unnecessary complex.
The way-to-go is to make it func_illusionary / func_detail_illusionary and add a simple brush with CLIP texture to act as its collision shape.

But what when the entity marked as illusionary is of a type that is interacted, so there are collision layers involved, custom properties, etc.
In such cases want the auxiliary collision shape to be child of it, so the collision system can check which type is the collider, to apply any custom game logic. (check if is Interactable, etc.)

With the previous example there's a distinction between the illusionary entity and its auxiliary shape, because they are two separate entities that become 2 distinct nodes.

The problem can be addressed by applying some custom logic on map build.
But considering that it is a pretty common thing that almost any project could need..

What about have a special texture called "Hull", that behaves similarly to origin texture?

Image

Workflow:

  1. create illusionary entity
  2. add to it a brush with Hull texture applied
  3. on map build the brush disappears and instead a child ChollisionShape3D is attached to the entity it is subordinated to, presumably with a convex shape.

NOTE: doesn't necessarily mean that only should work on entities marked as illusionary / that doesn't generate any collision.

EDIT:
also to use a workaround on map build, the entity the hull would be applied to must have a script to do some lookup (like a relation target ←→ targetname) in an exported func_godot_properties, otherwise cant do reparenting properly.
Thats a problem when only want to add a simpler collision shape to a plain func_illusionary or func_detail_illusionary (with complex mesh) as those doesnt have any script attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions