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

Option to only enable weapon collusion for swords? #249

Open
kevina opened this issue Feb 15, 2024 · 21 comments
Open

Option to only enable weapon collusion for swords? #249

kevina opened this issue Feb 15, 2024 · 21 comments
Labels
enhancement New feature or request

Comments

@kevina
Copy link

kevina commented Feb 15, 2024

Room scale weapon collusion can be dangerous, if you move you arms suddenly you can accidentally hit things. Normally it's easy to fix, but could be dangerous if you hit a villager's iron golem or a zombified piglin.

I only ever really use it in a fight, and not for mining (although fun at first, it quickly becomes very tedious).

Would you be open to add an option to only use it for swords?

I had a patch for 1.16 and the change was fairly simple. For weapon collisions the options become: Off, Weapons, Survival, On. Weapons for now will just include swords.

If interested I can redo the patch, I will base it on #221.

@fayer3 fayer3 added the enhancement New feature or request label Feb 15, 2024
@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

asking for clarifications, with only weapon collissions for swords you mean only hitting mobs with the arms(no blocks), or only swords can do damage?

@kevina
Copy link
Author

kevina commented Feb 17, 2024

only swords can do damage

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

so no hands, tools or other stuff can hit entities?

@kevina
Copy link
Author

kevina commented Feb 17, 2024

Correct, and you also can't hit blocks. I admit it is a bit of a hack, but easy to understand and implement.

Here is the patch I had for 1.16: kevina/Vivecraft_116@31f0a8d

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

would it be bad for other stuff to hit entities?

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

hm, maybe if someone wants to pet their pet

@kevina
Copy link
Author

kevina commented Feb 17, 2024

would it be bad for other stuff to hit entities?

You could hit a villager by accident if you move suddenly while trying to trade (has happened to me, not so bad unless you end up killing the villager), you could hit a villagers iron golmen (bad), or a zombified piglin (really bad).

As far as blocks go, you could knock an item out from it's item frame, mess up a fragile redstone build, etc.

I admit this is less of a problem for me now that I am using the index controllers, but it was a serious problem when I used the HTC Vive controllers as they had a longer reach. It has been a while, but I believe with the HTC Vive your arm is the controller and so it sticks out a bit more than your actual arm. With the index this is less of a problem as your arm doesn't stick out past your real arm. I don't know how the quest controllers are mapped and how much of a problem this is with them.

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

shouldn't be, the item should always be at your hand

@kevina
Copy link
Author

kevina commented Feb 17, 2024

All I remember is back when I played 1.16 with the HTC Vive controllers I was constantly hitting things. What I do remember for sure was the pickaxe stuck straight out (and likely other items) from the arm, rather than at an angle, which could of contributed. I would need to go back to using the HTC Vive controllers to give you more information.

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

the hands are alligened with the vive handle yeah, as is the tool, that is intended
grafik

@kevina
Copy link
Author

kevina commented Feb 17, 2024

And from that picture, it should also be obvious that when you hold the controller normally, your arm does stick out a bit past your hand. The combination of the two make it very easy to accidentally hit things.

Person Holding Vive Controller

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

that shouldn't matter much, but I get your concerns. index should be similar though

@kevina
Copy link
Author

kevina commented Feb 17, 2024

I think that the fact the the tool is at an angle from you in game arm make it a bit harder to accidentally hit something. I still did it a few times, but it not nearly as frequent with the index controller.

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

is the angle differnet? I don't have indexcontrollers to check, could you take a screenshot like I made to compare?

@kevina
Copy link
Author

kevina commented Feb 17, 2024

Yes. I try and do that the next I am in VR. How did you take the screenshot?

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

when you open the steamvr menu, it will show the controller on top, I then took a screenshot of steamvrs mirror window

@kevina
Copy link
Author

kevina commented Feb 17, 2024

vlcsnap-2024-02-17-17h15m48s565-fix

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

hm, so the hand sticks out the same.
the angle is probably different, because the grip and point vector are diffrent, whereas on the vive they are the same

@kevina
Copy link
Author

kevina commented Feb 17, 2024

Yeah. I am not sure what it is exactly that makes a difference as far as reach and hitting things. All I know it is seams be less of a problem for me with the index controllers.

@kevina
Copy link
Author

kevina commented Feb 17, 2024

If you look closely it seams the actual hand (or front part) of the arm for the HTC Vive is longer. My Vive controllers are charging but I plan to revisit this later.

@fayer3
Copy link
Member

fayer3 commented Feb 17, 2024

eh, the index finger is roughly at the second hand pixel for both

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

No branches or pull requests

2 participants