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

Ability to detect surface types #89

Open
mikecnr opened this issue Oct 1, 2020 · 1 comment
Open

Ability to detect surface types #89

mikecnr opened this issue Oct 1, 2020 · 1 comment

Comments

@mikecnr
Copy link

mikecnr commented Oct 1, 2020

@Crayder @NexiusTailer

Hi I'd like to request a feature to be added if it's possible. Can we please have the ability to detect the surface type that the casted ray hits? We currently get informed about the model, but the collision data holds information about the surface types too, no? Can this information be passed to PAWN by the plugin?

Obviously the game knows what surface type you are on for bullet hits and footstep sounds. It's part of the collision data.

https://wiki.mtasa.com/wiki/Material_IDs

For a use case example, I want to be able to detect when a player is standing on grass which will allow them to plant drugs.

Can you please let me know if and when this could potentially be added? Thank you.

@Crayder
Copy link
Collaborator

Crayder commented Oct 1, 2020

There is a potential, surface information can be extracted from the .col file.

https://gtamods.com/wiki/Collision_File#Structures
https://forum.mtasa.com/topic/60720-modify-surface-type/
https://forum.mtasa.com/topic/119808-collisions/ - this one lists the different "materials".

Data from both surfaud.dat and surfinfo.dat may be useful for some things too, like determining if the surface is grass or metal.


Changes needed in Wizard:


Storing the data in the bullet memory is the more trivial part. Can be figured out though.

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