Character slightly shift off the axis he is on then back to it

Hello,

i noticed when i was playing INSIDE game the character is slightly shift to evade obstacle on his way, for a example this clip. is so fluid and smooth especially from 2d view.

However, i was wondering to to achieve this mechanic for a 2d format.

i tried with a collision box to set world location of the character off by a number then smooth it with a timeline and a lerp. here is a test

i don’t like the result and its a bit quirky and snappy.

so how to achieve this?

1 Like

I haven’t played the inside.from the video I see it doesn’t look like shifting.I see the character turns his direction.

How do you control the character in the game? Does it allow you to turn left and right?if you can only move forward and back.it might be move along a spline.

1 Like

in a 2d/game the character moves in 2 axis back, forward, up and down however even the character in the game is only moving forward and back i don’t think the made a spline for the gameplay right??
yes i thought of a spline but in the game that object you can drag/push it back, forward and still character turns his direction wherever that object location is in. can a spline deform or change shape even if the object moved? you can see it here

I don’t know how the game done the movement.
But here I press WS while in the collision the character will automatically change direction.
But the amount is hard to adjust, depends on the size of the collision and the amount of turning.


1 Like

For better effect you might need to do some math.which I don’t know so I can’t help.

Thank you so much! unfortunately this did not work for i got error messages





Well,it might be that the obstacle variable is not valid.you could try set the variable on every collision Begin overlap or set it at character begin play.

But screw that…I think we maybe overthinking too much.
Why not just:
image

Set the collision box to block player

1 Like

hahah i love it but this no go, i mean what will happen if the player jumps down from the box either left or right? he will float on the air right?

anyway thank you so much!

1 Like

I got this:

By messing around with navmesh. In a nutshell:

  • hold forward only
  • project a point (the yellow bit) in the direction we want to go
  • have the navmesh take us there
  • trace on a separate channel the obstacles ignore

Would that work for you? Seems like it could work.


And to make it work better, you could take the path points (green) and and turn them into a spline. Then, instead of walking towards a Trace End (yellow), drive a dummy along the spline and have the character AI play catch-up with that dummy. That would give you much smoother result, especially turning. The above is merely the CMC’s interpolation via the Rotation Rate.

1 Like

very interesting! Thank you so much!!

It would work for me but the idea is to interact with the obstacle ( if its interactable ) for example a box the character needs to push or pull to jump over a wall but at the same time dose not block the character path if he want to pass it.

dose this logic work for that? if so is it easy to is it easy to setup? from a perspective of an artist not a programmer ( i wish i was ) dose seems over my head

Yeah, you trace on specific channels, walk around non-interactive entities, but approach the ones you can interact with.

Setting it up is not difficult but you need to understand a bit of UE AI and how navmesh works. Some vector math will be helpful here.

2 Likes

I see. Where should I start? If it’s not too much to ask, would you like to share the blueprint to get an idea of how things work. for example:


is this a sphere trace on tick?

1 Like

I think it’s the line trace end location.the line trace ignores the obstacles.

1 Like

you probably right, but how to do that?

1 Like


It’s like this…


This should thank to Everynone ,
I found it interesting so I try to make one.

1 Like

Consider ditching Tick and trace on Triggered instead. Get data from Hit Result and message (non)interactives that way.

But yeah, the idea is not to directly control the character but to give it a mind of its own. It needs to know how to react to the environment. Both Limbo and Inside pull it off effortlessly.


Admittedly, there’s probably a handful ways of handling it.

2 Likes