Fearless Forums
Working Tesla autopilot using NavMesh within GMod - Printable Version

+- Fearless Forums (https://fearlessrp.net)
+-- Forum: General Discussion (https://fearlessrp.net/forumdisplay.php?fid=10)
+--- Forum: Discussions (https://fearlessrp.net/forumdisplay.php?fid=4)
+---- Forum: Archive (https://fearlessrp.net/forumdisplay.php?fid=481)
+---- Thread: Working Tesla autopilot using NavMesh within GMod (/showthread.php?tid=98649)



Working Tesla autopilot using NavMesh within GMod - User 7141 - 05-12-2021

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.


RE: Working Tesla autopilot using NavMesh within GMod - Conn - 05-12-2021

Possibly, navmesh on evocity is a bit fucky iirc


RE: Working Tesla autopilot using NavMesh within GMod - Pollux - 05-12-2021

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/filedetails/?id=1587455087


RE: Working Tesla autopilot using NavMesh within GMod - User 7141 - 05-12-2021

(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/filedetails/?id=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


RE: Working Tesla autopilot using NavMesh within GMod - RoCKy - 05-12-2021

(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/filedetails/?id=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


RE: Working Tesla autopilot using NavMesh within GMod - Pollux - 05-12-2021

(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/filedetails/?id=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.


RE: Working Tesla autopilot using NavMesh within GMod - User 7141 - 05-12-2021

(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/filedetails/?id=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


RE: Working Tesla autopilot using NavMesh within GMod - Pollux - 05-13-2021

(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/filedetails/?id=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.


RE: Working Tesla autopilot using NavMesh within GMod - User 7141 - 05-13-2021

(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/filedetails/?id=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