Tyre material using world position offset

Hi!
I wanted to make a tyre material, using world position offset so that i can mimick a real cars tyre behavior. (like the tyre is flat or moving a bit to it’s side)
So the effect on the tyre should be in it’s local space i have managed to get it working but only in world space (currently using the transform position node in local to world space but that’s not working exactly as it should) which i don’t want because when the car goes on a hill and the car rotates then this offset will disappear.
Any help is appreciated!

So… first of all, its Tire.
with an i.

Second thing.
First, you need a variable to be able to set a scalar parameter that returns the Normal of the impact point of the tire (or the car since a general value is probably best here)
to do this you can either generate 4 different ray trace results - one per tire, or a single one on the root of the car.
Then ontick, or with an event, change the stored value of the incline.

Now, create a flat tire height map texture, and in the material rotate the texture to match the angle of the tire or car.
since the tire rotates, this value has to also constantly rotate along with the speed factor of the car in order to look “flat”.

A more mathematical solution Would be to use the angle to detect all the UVs tha point toward a range to the angle, and use those as a mask to “flatten” the tire.
since pixelws is affected by tessellation this may return odd results though.

Thanks for the reply !
I know that it’s tire in American English and it’s tyre in British English but nevermind that typo.
It could be made just like you wrote it, but i actually think that it would have a bigger performance hit then my approach.
My approach already gives me a height map like texture which is basically a mask texture according to the 3 axes and it works kind of, (attached more images so you can see it what i’m talking about) it only needs to be converted to use the cars local space but it’s not working as it should.
Any advice?

Generally, More math = less performant.
So the texture way might outweigh the calculation way.

Wither Way you can convert your code to mask an area defined by the range between the reverse angle of impact as th UV Normal and a range value (angle - range).

0,0,-1 would be everything that points downwards on a flat surface. A range between 0,0,-.8 and 0,0,-1 might just isolate exactly the pixels you need to “deflate”.
It would also automatically rotate, which is actually more math - less in the material, more on the GPU.