Paint a continuous line at every point that a character touches - sprite platformer
Hi, I'm working on a side-scrolling sprite platformer, and I want it that wherever the character runs, it leaves behind a coloured trail. So basically, a coloured spot at every single point that they touch, which would give a continuous coloured line painted everywhere that they've been.
I'm very new to development so please talk to me as if I'm stupid and assume that I know nothing.
Anyway, I've been using hitboxes around the character capsule (ideally I wanted different colours for bit that they walked over and bits that they touch with their sides) which spawn an object on collision with objects in the world, but since that only generates an object at the initial overlap, it doesn't leave a trail at all. What am I missing? I must be going about this the wrong way. Do I want to be using sweeps, and if so how? Examples of blueprints would be fantastic.
As you can see, my current blueprint for this is basic in the extreme. This shows how I'm handling the overlap for the hitbox on the left of the character, but there's one on the right and one at the bottom too, and they're all working the same way.
asked Dec 31 '16 at 01:54 PM in Blueprint Scripting
While I may not understand what you want to do entirely, I'll try to help LOL. So off the top of my head you can try using a spawning event which spawns your object and then have a timer with some kind of duration to maybe sync up with the footsteps of your character. The timer would loop depending on whether your character is moving or not. Here's and example. Just take note it may not be perfect but hopefully it'll help.
EDIT: Using this you probably won't need those hitboxes on your character but that's mostly up to you if you want to keep them.
Follow this question
Once you sign in you will be able to subscribe for any updates here