Posts: 319
Threads: 94
Likes Received: 57 in 34 posts
Likes Given: 80
Joined: Oct 2012
05-12-2021, 06:33 AM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Checked Encoding
)
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.
Posts: 2,098
Threads: 176
Likes Received: 2,008 in 737 posts
Likes Given: 954
Joined: Aug 2014
Reputation:
59
05-12-2021, 09:06 AM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Possibly, navmesh on evocity is a bit fucky iirc
Regards,
Connnnnnnn
Consider giving me a rep point here.
Posts: 5,104
Threads: 237
Likes Received: 3,608 in 1,515 posts
Likes Given: 2,992
Joined: Dec 2012
Reputation:
69
Country:
05-12-2021, 11:58 AM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community. Edited 2 times in total.
Edit Reason: Checked Encoding
)
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
__________________________________________________________________
Posts: 319
Threads: 94
Likes Received: 57 in 34 posts
Likes Given: 80
Joined: Oct 2012
05-12-2021, 03:09 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
Posts: 880
Threads: 47
Likes Received: 419 in 253 posts
Likes Given: 1,036
Joined: Jan 2018
Reputation:
38
Country:
05-12-2021, 03:26 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
Posts: 5,104
Threads: 237
Likes Received: 3,608 in 1,515 posts
Likes Given: 2,992
Joined: Dec 2012
Reputation:
69
Country:
05-12-2021, 03:34 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
__________________________________________________________________
Posts: 319
Threads: 94
Likes Received: 57 in 34 posts
Likes Given: 80
Joined: Oct 2012
05-12-2021, 05:45 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
Posts: 5,104
Threads: 237
Likes Received: 3,608 in 1,515 posts
Likes Given: 2,992
Joined: Dec 2012
Reputation:
69
Country:
05-13-2021, 12:36 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
__________________________________________________________________
Posts: 319
Threads: 94
Likes Received: 57 in 34 posts
Likes Given: 80
Joined: Oct 2012
05-13-2021, 01:40 PM
(This post was last modified: 09-01-2022, 01:08 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(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
|