Forum Discussion
DillonRobinson
12 years agoHonored Guest
Comfortable forced crouching?
Hello guys, I have a question here. As I near the end of my next project, I have an idea. In a couple areas throughout my diorama game, I have placed some chairs. I disabled their collision boxes, ...
DillonRobinson
12 years agoHonored Guest
"drash" wrote:
To simply check equivalence, use a double equal sign instead. The reason it works without the "= true" is because everything inside the if's parentheses are evaluated to a true/false condition.
Ahhh thank you for the explanation! It's starting to come back from college 6 years ago ;)
I also assumed that anything within the's if's "(...)" was a condition or operator, and that variables (like a boolean) couldn't be changed in there. Good to know!
I'm sure I'm using C# in the least efficient way possible, but I did indeed get this working, and it seemed to add the slightest of transition between standing up and sitting down. No more than 2 frames transition, but I don't think I need to make it too smooth and this seems comfortable if you know you're walking into a crouching zone.
I also just wrote a script to attach to light switch meshes, link a few components (the light object they relate to, and that light's "bulb" mesh), and now I have working light switches!
At the rate I'm finishing this at, I considered removing the crouch script since DK2 is on the horizon, but figured people don't want to physically sit down from a standing position just to sit, so I'm leaving it in and seeing how it feels with positional tracking.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 months ago
- 3 years ago