blinkingcape Posted April 24, 2023 Share Posted April 24, 2023 Anyone can help me with a wallrun system and say a command in lua to restart the scene (for when i die) Quote Link to comment Share on other sites More sharing options...
Alienhead Posted April 24, 2023 Share Posted April 24, 2023 world:Clear() ?? I haven't done any wall runs in the past, afraid I'm not much help on that topic. Although I see it's become ever so popular.. May have to look into that style of game soon. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Alienhead Posted April 25, 2023 Share Posted April 25, 2023 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. 1 Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted April 25, 2023 Share Posted April 25, 2023 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: 1 2 Quote 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 More sharing options...
Alienhead Posted April 25, 2023 Share Posted April 25, 2023 That would be so awesome, I can already think of about 100 things I'd like to do with that ability. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted April 26, 2023 Share Posted April 26, 2023 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. Quote 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 More sharing options...
SpiderPig Posted April 26, 2023 Share Posted April 26, 2023 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. 😁 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.