So I’m relatively new to Unreal, I have a basic understanding of the engine I’ve watched all of the video tutorials from unreal and plenty of community tutorials and have played around in the engine plenty so I hopefully won’t have trouble understanding your explanations.
At the moment, what I have is a controllable sphere pawn. This is the basic node setup of the balls player controller blueprint:
This is more or less the exact setup from the roller game starter project. What I’m trying to get is a period of time where the player can make the ball can gain speed on the spot before releasing it where you can then control direction, sort of like how in sonic you can do that spin dash thing where you spin up on the spot and dart off real quick.
So what I’m looking to do is allow the player to determine the speed which the ball launches off at based on the time period before released. For example the player would hold down the W key and the longer the key is held the quicker the ball will launch and there would be a limit to the amount of time and thus speed that the player would be allowed to gain before the ball would launch at this maximum speed.
Any help is much appreciated, please try your best to explain each step so I can understand what’s going on and so I can apply these principles to other examples and learn the engine more. Thanks in advance.
…not exactly sure if this helps as I’m new to UE4 as well - but you may want to experiment with a “launch character node”. It gives the launching effect that I think you’re looking for.
I didn’t find a “launch pawn node” so this may not work for a pawn. but maybe it’s possible IF you change your ball - from a pawn class to a character class.
This can be done in your “Pawn’s class BP” under class settings (to the right of compile) Something you’d have to experiment with.
But applying a hold / charge / release system is another matter…
Hope this helps somewhat
Launch character will fire you up indeed though its more of an arc movement (think jumppads)
Since youre using Torque (Ive never used it before but I assume it just moves the object with physics in that direction)
I’d suggest something similar to this, of course you would want to add Logic that governs max holddown time (A timer or a tick counter) logic that checks if the player is even allowed to do that atm etc. but thats the general Idea:
Every tick the launchvelocity is increased while W is being held down when W is released it will fire
Cheers to both of you for the responses :). I haven’t had a chance to set any of this up yet but I understand how to go about it now and I should be able to figure out the time aspect on my own without too much trouble. Anyway thanks for the clear explanations and the screenshot was super useful too.