Announcement

Collapse
No announcement yet.

Properties in Actors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Properties in Actors

    HI,

    Yesterday I developed a blueprint which highlights the actor that the player is looking at (using traces and blendables). The problem is that all the actors are highlighted (when the player looks at them). I want to highlight only the "Selectable" actors.

    If i were developing my game in an Object Oriented programming language, I would simply create a "Selectable" Interface/Trait/Mixin and extend it in all the objects that I want to be selectable. I want to have the same behaviour using Blueprints, but I dont know how to extend the actors. For example I want to add a Chair (the sample one) to my level and assign that behaviour. Is there a way to create my own Objects which extend from another (for example, a Chair) and have a custom behaviour (Selectable)?

    Thanks, I'm very new to UE4 but I have 6+ years of software development.

    Here is a screenshot of what I've done so far (notice the yellow outline around the chair)

    Click image for larger version

Name:	Screenshot from 2015-12-29 17:39:10.png
Views:	1
Size:	284.6 KB
ID:	1169362

    #2
    One way would be to make any objects you want highlightable under a child class of Actor and then cast your hit result to your parent class. (e.g. Actor>HighlightClass>Chair)

    Comment

    Working...
    X