Working Tesla autopilot using NavMesh within GMod
#1
I've been wondering if this is technically possible. If a nav mesh is generated for a set map, would a car be able to, in this case a Tesla have a functioning autopilot system?

I did some digging and research into this, and it seems like if the user selected a place to drive to, we could quickly replace the car with an NPC, therefore using the built in NextBox navigation, set the player to be inside the NPC and then tell the NPC to move to the given point.

We would need a variable to pass through any damage done to the "NPC" and return that so functionality such as the car health would reflect any damage done to it, along with a function that does damage to any players sat inside of the NPC.

Does this sound feasible? I wouldn't mind having a go at attempting to create a script for something like this.
#2
Possibly, navmesh on evocity is a bit fucky iirc
Regards,
Connnnnnnn

Consider giving me a rep point here.

#3
I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087
Pollux
Fearless Management
bork
__________________________________________________________________
The following 1 user Likes Pollux's post:
  • Slaint
#4
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087

I might have a look into taking it onboard as a project if I get bored at some point. The only reason I thought about quickly replacing the vehicle entity with an NPC is because under my limited understanding of source, it’s not possible to programatically tell a vehicle to move? Unless I’ve got that wrong
#5
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087
That would be literally so cool for big maps so we don’t feel that lonely and you can just steal those vehicles xd - Well.. that would be like GTA then xd
[Image: WbmV7IO.mp4]
#6
(05-12-2021, 03:09 PM)h3x Wrote:
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087

I might have a look into taking it onboard as a project if I get bored at some point. The only reason I thought about quickly replacing the vehicle entity with an NPC is because under my limited understanding of source, it’s not possible to programatically tell a vehicle to move? Unless I’ve got that wrong

Instead of having the car itself be the NPC I think it's better to have an NPC which drives the car. That's how the workshop addon I linked seems to do it.
Pollux
Fearless Management
bork
__________________________________________________________________
#7
(05-12-2021, 03:26 PM)RoCKy Wrote:
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087
That would be literally so cool for big maps so we don’t feel that lonely and you can just steal those vehicles xd - Well.. that would be like GTA then xd

From the looking I've done and from Pollux's comment above I don't think implementation in CityRP would be possible with the current cars without redeveloping the car scripts, however it's something that could potentially be worked around if I find a solution and feel like handing it off to FL
#8
(05-12-2021, 05:45 PM)h3x Wrote:
(05-12-2021, 03:26 PM)RoCKy Wrote:
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087
That would be literally so cool for big maps so we don’t feel that lonely and you can just steal those vehicles xd - Well.. that would be like GTA then xd

From the looking I've done and from Pollux's comment above I don't think implementation in CityRP would be possible with the current cars without redeveloping the car scripts, however it's something that could potentially be worked around if I find a solution and feel like handing it off to FL

I don't see why it wouldn't be possible as it works with regular cars from what I can tell, it just isn't practical due to performance.
Pollux
Fearless Management
bork
__________________________________________________________________
#9
(05-13-2021, 12:36 PM)Pollux Wrote:
(05-12-2021, 05:45 PM)h3x Wrote:
(05-12-2021, 03:26 PM)RoCKy Wrote:
(05-12-2021, 11:58 AM)Pollux Wrote: I remember Arny messing around with this ages ago, it was extremely basic and didn't really work from what I remember.

It is possible. I don't think using a navmesh with a car npc is the best way though.

EDIT: This exists https://steamcommunity.com/sharedfiles/f...1587455087
That would be literally so cool for big maps so we don’t feel that lonely and you can just steal those vehicles xd - Well.. that would be like GTA then xd

From the looking I've done and from Pollux's comment above I don't think implementation in CityRP would be possible with the current cars without redeveloping the car scripts, however it's something that could potentially be worked around if I find a solution and feel like handing it off to FL

I don't see why it wouldn't be possible as it works with regular cars from what I can tell, it just isn't practical due to performance.

Yeah I got a slightly working concept done before with a couple different car packs, needs a ton of work though


Forum Jump:


Users browsing this thread: 1 Guest(s)