Skip to content
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

The Player falls through the platform immediately upon opening the Website #12

Open
Dhruvisgoat opened this issue Dec 23, 2023 · 12 comments

Comments

@Dhruvisgoat
Copy link

Dhruvisgoat commented Dec 23, 2023

Screen.Recording.2023-12-23.at.1.04.35.PM.mov
@Dhruvisgoat Dhruvisgoat changed the title The Player falls through the platform immediately upon opening the Website.(not sure why its happening sometimes , same problem with the code sandbox one too) The Player falls through the platform immediately upon opening the Website Dec 23, 2023
@ErdongChen-Andrew
Copy link
Owner

It seems to be a performance issue. Try opening it on different devices.

@Dhruvisgoat
Copy link
Author

Tried running on multiple devices ,and different browsers but the issue still exists .. the problem does get resolve upon reloading multiple times .
Is it due to the Map taking more time to load than the Player ?

@ErdongChen-Andrew
Copy link
Owner

Could be. 🤔
How about this codesandbox: https://codesandbox.io/p/sandbox/ecctrl-w-o-animations-3k3zxt?file=%2Fsrc%2FApp.js%3A38%2C19
It requires less performance

@Dhruvisgoat
Copy link
Author

nah same issue with that :(

@Dhruvisgoat
Copy link
Author

hey btw after replacing the entire character with a low geometry mesh ,it seemed to work fine :)

@ErdongChen-Andrew
Copy link
Owner

Good to know that! Seems like i added too much to the demo 😂

@Dhruvisgoat
Copy link
Author

btw i noticed few more issues with the codesandbox demo , one that the jump functionality doesn't seem like working and the player keeps on moving infinitesimally upon pressing wasd keys. Whats the possible fix for that 😅

@ErdongChen-Andrew
Copy link
Owner

Everything is functioning well on my site; I've never encountered that issue.

@Dhruvisgoat
Copy link
Author

Sure, btw how did you implement the logic of using a first person camera movement for the touch device ,
as PointerLockControls do not work for mobile devices
, its taking my life to find a solution for that :((

@ErdongChen-Andrew
Copy link
Owner

I wrote the camera movement myself, allowing me to check for the availability of PointerLock. If it's not available, I use drag and move functionality.

@Dhruvisgoat
Copy link
Author

could you mind sharing the code for drag and move functionality or if possible help me with creating a react wrapper for such drag and move controls.

@ErdongChen-Andrew
Copy link
Owner

You may check the code in useFollowCam.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants