Jump to content

Wall run and reset scenes


blinkingcape
 Share

Recommended Posts

After thinking about it a few hours, this is the way I believe I would approach it - 

Dont use your character model as the physics controlled entity. Instead use an invisible box and put the character controller on that. Position and rotate your character model manually. 

Now you will want to set the worldgravity(x,y,z) to whatever angle the wall is your running on, for example if you are running along the left wall you do something like worldgravity(-10,0,0), now  position your player to the character box and manually rotate it to give the illusion your are controlling it. 

Of course theres quite a bit more to work out, but that would be the base I'd use to get started.

  • Like 1

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

I've actually been thinking about adding a command that lets you change the orientation and/or gravity of the player controller. It won't come out until later this year, but I think there are some interesting things that can be done there.

As for resetting the scene, you can reload it, or if the scene is fairly simple just save all the starting positions of all moving objects and restore them later.

In Ultra there is a feature to save or reset a scene without recreating all the content, but it's still a little WIP:

 

  • Like 1
  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

One way I am thinking this could be used is you have a rule like "if the slope the player is standing on is between 35 and 60 degrees, and their horizontal velocity is greater than some threshold, then the surface normal becomes the new orientation for the player physics". And then you could make the camera tilt gradual over 1-2 seconds, so the whole world would tilt with your view.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

15 hours ago, Josh said:

I've actually been thinking about adding a command that lets you change the orientation and/or gravity of the player controller. It won't come out until later this year, but I think there are some interesting things that can be done there.

Can't wait for this. 😁

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...