More code code refactoring

II have thinking of doing the fellow for refactor the code:

  1. Create an Pressure Plate class (parent class ATriggerVolume). This would have the methods to get and find the total mass in volume

  2. Create an class for Door (parent class AActor). This would have an StaticMeshComponent, and PressuePlate, and methods to Open and Close the door.

Would this be going to far?

Personally, I’d use components for those types of behaviour rather than creating new classes. Components are reusable and easy to attach and detach, whereas classes are much more fixed.

Privacy & Terms