Blueprints estandar
Blueprint classes and when to use them: blueprint class (wrapped for static mesh components as well as blueprint interacivity), data (inherits comonents and variables from other bp), level class (unique to each level), macro class (store multiple `re-made bp, reuse from other projects)
Creating the automatic door actor
BP_AutoDoor: Viewport: Import mesh and add box collision Construction script: GetRelativeTransform from both mesh door and Set initial positions. Event graph: On ActorBeginOverlap, Timeline (double click for edit) and reverse input with EventActorEndOverlap. In open output Lerp (blend) between start and 90 degrees.nIn Update output SetRelativeLocation with YLocation as Lerp values.
Light switch
BP_FirstPersonCharacter: Function 'LineTrace': When InputActionInteract LineTraceByChannel with GetWorldLocation and GetForwardVector (sum) as inputs. BP_CeilingLight: snap ceiling light to the slab Construction script: LineTraceByChannel with GetWorldLocation and GetActorUpVector then SetWolrdLocation of the object with the HitActor Location
Change material
BP_MaterialChange: change material que box collision is overlapping and specific key is press Event graph: EvenActorBeginOverlap Set variable CanUse=True (else False) and SetVisibility Event ChangeMaterial if CanUse then FlipFlop and SetMaterial BP_FirstPersonCharacter: Function 'LineTrace': CastToBP_MaterialChange and ChangeMaterial
Última actualización
¿Te fue útil?