R
R
Rostislav Komarov2021-06-01 14:05:20
unreal engine
Rostislav Komarov, 2021-06-01 14:05:20

How to make a single logic of actions with different objects?

Good afternoon. I'm interested in how to use the same logic for different objects. Let's say I have a ball, a cube, and a cone. Absolutely three different things. I need to be able to highlight them on hover, display the title, and pick them up. Other than Cast To "..." I don't know anything else. That is, there will be hundreds of these pickup items - several hundred, and I can’t use cast to on each object. Maybe I don't understand something, if anyone knows any guide I would be grateful.13o18f2

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexei No, 2021-06-01
@alien2023

Well, make a separate class for items that you can take. Then cast on it.

K
Kirill Pavlov, 2021-06-03
@thelegend3004

I would use interfaces

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question