-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example / best practices for climbing (ladder / ivy) #54
Comments
It's not supported yet (though I do plan to support it). One could hack it with a custom Basis/Action, of course, but they'd pretty much be implementing the whole thing from scratch, which is not something I want to put in an official example. Once I support the feature I'll create an example. |
I am trying to implement this custom Climbing basis myself (forking the Walk one), and i also want to implement NoClip flying like in SourceEngine games. However, to do this, I would like my custom basis to be able to have a trait that lets me turn off collision and turn off gravity some how for this particular entity while they are in that basis. This would be nice for Swimming too. Does that make sense? How can i do that? (is there a hacky work around for now ?) |
Okay i realized i can use Avian3d GravityScale component to do the gravity scaling. However how can I
|
Oh i think i can use LinearDamping and LockedAxes ... will report back :P |
YAY! I was able to implement climbing by hacking up the Walk basis to contain very very little (like 10% of what it used to contain) and then by using GravityScale =0, LinearDamping = 5.0, and LockedAxes (all locked except for Y axis movement) and it is Source engine like ladder movement :D Kind of interesting that i have to use a mixture of avian and tnua code here to accomplish this but its actually very clean and nice overall |
As for determining what you need to cancel - |
ahh okay. I think it is a bit weird that i have to cancel out gravity in the basis code and that it is automatically applied. Since i am making a NoClip basis and Floating basis and Swimming basis, it is super annoying to have to deal with the fact that gravity is implicitly applied and then having to cancel it out. I would rather gravity NOT be implicitly applied and then i would just need to apply it myself in the basis that use gravity like Walk and Crouch and what not ... hmm .. |
IM trying to counteract gravity like you describe but it isnt working ..
|
Weird. I'll have to look into it. |
Not sure this is possible with just Tnua. A no-clip requires interfering with the physics backend's collision configuration, which Tnua doesn't do. This is part of the root of many of the limitations you encounter - I'm trying to limit the surface area between Tnua and the physics backend, to reduce the effort it requires to support all the different backends. |
Add an example / best practices for climbing (ladder / ivy)
The text was updated successfully, but these errors were encountered: