Animation Car?

I was thinking is it possible to do an animation for entering a car & changing seats instead of just pop-in.
and need to look directly at the door instead of click “E” anywhere on the car. is this possible with lua of gmod??

You can do the “look” at the door to enter the vehicle - The thing is you’d have to either estimate the door position automatically (which can be inaccurate) or you’d have to manually define door-points, you probably even could do the animation, but the problem is the vast majority of the vehicle models do not have the vehicle doors as separate bones/animations so you’re unable to manipulate them. Not even mentioning that custom player animations are ass to work with.

Is it possible?
Yes.
Is realistic?
If you want to support every single vehicle, no - Most cars’ doors in-game can’t be manipulated.

As rako said, basically that.

Back in the old days if we wanted to do something like that it would usually first involve getting the model file into 3ds max or similar program, using that to make the door a separate entity, then recompile it and put it in game. From there you would use LUA to do a basic “get in the car” action, though the animation was basically non-existent. All of that of course is easier said and done, usually you’d be looking at a few hours if you knew what you were doing.

@rako can you give some functions that will be used on this condition.

You’d probably use:

To block the player from initially entering the vehicle on E press, and instead reroute this to your own animation logic/entering logic, or just straight-up block any calls that aren’t coming out of your own entering logic.

You’d probably use https://wiki.facepunch.com/gmod/GM:PlayerUse
In there, do some logic to check which “seat” point they are intending to enter at. I’d probably do this by looping over the vehicle seat table that VCMod might return and getting the seat closest to the player, then calling https://wiki.facepunch.com/gmod/Player:EnterVehicle on it.

Mind you, by default, there is no such thing as passenger seats. You’d have to consult with VCMod’s wiki or you’d have to create your own vehicle passenger-solution.