EverNewJoy / VictoryPlugin

Rama's Victory BP Plugin
MIT License
867 stars 256 forks source link

ZoomIn and ZoomOut BP nodes #11

Closed teak421 closed 7 years ago

teak421 commented 8 years ago

Added a ZoomIn and ZoomOut node. Each node has a Min Target Length / Max Target Length and also a Zoom Intensity. Hook in a InputAction and go.

Please review and modify as necessary. If too simplistic or not needed, please disregard.

EverNewJoy commented 7 years ago

Hi there!

Lovely to hear from you @teak421 !

This is intended to be used in a timer or tick function right? As you increment toward the goal?

If so could you add a comment indicating that this should be used in that way, and maybe return a bool to indicate when the goal length has been reached so user can end the timer if they are using one?

If you had other intended use let me know!

Rama

teak421 commented 7 years ago

Please see attached the screenshot that should explain better than me typing here. It works well, but I wish it was smooth. I tried putting an FMath::FInterpTo but that won't work because there is not tick function because its being called from the mouse events. I tried to add an input pin with world time settings, but that didn't work either. The goal would for it to be smooth like when I attached to my camera pawn...(which has the tick!). But, I created this because I thought people could use it instead of making a bunch of other nodes...even if it wasn't smooth. I hope I made some sense here...apologies as I've only got a few months into this UE4 C++ thing......

PLEASE disregard the errors in the below screenshot... I'm at work and do not have all of the source code loaded.

camerbp

teak421 commented 7 years ago

Also, working on making into a single node... At least, trying.......

EverNewJoy commented 7 years ago

ahh I see, well doesnt that camera move in stiff increments though with each key press?

if you started a timer on the input and cleared the timer on the release, then you could have a continuous zooming effect, using smaller zoom increments.

You could do this in BP, obviously can't use a timer in static BP node :)

Timer of like 0.01 seconds

Let me know!

Rama

teak421 commented 7 years ago

I think because its not a smooth zoom it wouldn't be a good idea to add... Thanks!

EverNewJoy commented 7 years ago

well you can't make it smooth from a static BP node context, but that's why you'd just show a pic of the timer setup in BP :)

Rama

teak421 commented 7 years ago

OK... I'll work on that... and, maybe try to make it a single node too. Thanks for the tips!

teak421 commented 7 years ago

Could the timer be in C++ so the end-user doesn't have to mess with it?

EverNewJoy commented 7 years ago

no, but its easy to setup in BP, no timers in static BP functions

teak421 commented 7 years ago

OK...last question...which specific timer mode are you speaking about? Should have had this all worked out before submitting... apologies....

EverNewJoy commented 7 years ago

in blueprints, you would just start a timer on pressed, and end it via handle on released

https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/

:)

teak421 commented 7 years ago

Hi. Need to retract this PR because an Actor Component was created that doesn't need a timeline in BP. Seems to be easier. Thanks for all of your pointers / suggestions...

teak

teak421 commented 7 years ago

FYI. Plugin here: https://github.com/teak421/SmoothZoom

EverNewJoy commented 7 years ago

Ahh thanks for sharing! :)

Rama