PedrelliLuca / ScalarField

A TopDown RPG Game, where magic works by interacting with the environment.
4 stars 0 forks source link

Make `UThermodynamicComponent` inherit from `UActorComponent` #29

Closed PedrelliLuca closed 1 year ago

PedrelliLuca commented 1 year ago

What?

At the moment UThermodynamicComponent is inheriting from UCapsuleComponent, meaning that its logic is inseparable from the capsule-shaped collision. What we want is a situation where the logic dealing with the heat exchanges is split from the actual collision. This is achieved by having UThermodynamicComponent inheriting from UActorComponent while holding a reference to the actual shape, which for the moment will be kept as a UCapsuleComponent.

Why?

The current situation forces any object that exchanges heat to have a capsule-shaped area of influence. This is problematic for the correct behavior of complex shapes, but also for very simple shapes that do not look like capsules at all. We want to reach a situation where the thermodynamic logic can be associated with an arbitrary-shaped region. This is the first step in that direction.