Just to provide a bit of context for the video and screenshots:
So in the video, the behavior at 60fps is what I expect to normally happen. But when I set my max to 144 and then slide, I go further than expected. Then when I reduce the framerate, my slide barely makes my player travel.
For the blueprint: Before the slide key is hit, the player velocity is stored. Then on the event for crouching, it simply sets the bool to true so the tick can pass through set the player velocity so it slows down gradually
So again: I’m really not sure what the issue could be here. The actual interp node is taking in the deltaTime, yet the sliding is still being impacted by the framerate.
I’ve tried timelines aswell before posting this and the result is the same: The sliding is affected by framerate. If anyone could point me in the right direction on what I could change I’d really appreciate it. I’m guessing it might be the actual SetVelocity node if both the timeline and interp aren’t behaving correctly but I’m not sure
Pardon me for bringing this topic up again but I’m a bit of a newbie to unreal engine so I’m trying my best to learn these concepts lol.
So the “vectorInterpTo” node did work for almost every other thing I tested it on. Like moving platforms and objects, but when I tried applying it to this sliding mechanic I realized that the ground friction ruins the interpolation. Since we’re sampling the current speed in real-time for the node, when my player hits the ground and the slide begins my velocity automatically hits zero because of the friction. Is there any workaround to this?
I tested timelines a bit more but I’m not sure if I’m completely just messing something up but they’re not framerate independent either?
and then by multiplying the velocity right before sliding and then using the timeline to slowly multiply by zero so it cancels out.
Why is it that on lower frames I slide less and on higher frames I slide further? You can try this out yourself too just with any first or third person character and then just setting the velocity. It’s a completely different experience on higher or lower framerates
Although it’s a bit more stable than multiplication since on lower framerates I still slide somewhat accurately but on higher framerates I still go much further?
Again pardon me for asking about timelines all of a sudden when the original point of this topic was the interpTo node, but Like I said: the specific VectorInterpTo node worked perfectly for other things, but since the ground has friction it just doesn’t work for that since my player instantly stops lol.
So I’m trying to resort to timelines or any other way that would give me a similar result.
There’s still a difference on higher/lower framerates in how far my player slides
Seriously, try this out yourself, I can’t understand why the timeline works PERFECTLY for everything else but just this, it doesn’t work for this sliding mechanic
Ah alright this works on all framerates I’ve tested it out on. Thanks for informing me about the physics aswell I wasn’t too sure about that.
Only problem with this method of sliding is that your player can slide through walls. That’s why I initially went with adding velocity.
So with the physics interfering with DeltaTime then, is there nothing I can do? How do other games go about adding sliding mechanics? A lot of platformer games that have been made on unreal engine manage to deal with this issue so I’m not sure how they get a smooth sliding experience even on lower frames?
I guess besides this, my other alternative could be that when the player slides, the gravity and physics simulations are turned off and I could make an entire system around that.
Well anyways thank you a LOT for bearing with me. I learned mostly off youtube so I never even knew that there was a physics involvement aswell lol.
You’ll need to do a line trace and stop the slide, that’s one way.
Physics doesn’t change delta, but your original code wasn’t letting the timeline do the work. If you let physics take any control, you will get unpredictability.
Yeah I mis-worded that. The world environment interferes with it and it’s unpredictable and all that.
Anyways my understanding is a lot better so I’ll work on this using trace scans and figure something cool out. Seriously though thanks a ton. You’re a legend to this community. Checked your profile earlier and how many posts you respond to, you’ve saved thousands of people from headaches including me.