Logo
Explore Help
Register Sign In
bif/retrace
1
0
Fork 0
You've already forked retrace
Code Issues Pull Requests Projects Releases Wiki Activity
retrace/Characters/NPC.gd

13 lines
225 B
GDScript3
Raw Normal View History

Add NPC class which Meldewesen now inherits from This is in preparation for being able to more finely control the NPC, both from the specific NPC implementation and the PathNavigator (which was renamed accordingly)
2019-11-11 10:24:29 +01:00
extends KinematicBody
class_name NPC
Meldewesen runs towards player when seeing it The NPC got some functionality which now allows it to tell the PathNavigator where it wants to go, in addition to the default behavior.
2019-11-11 10:44:20 +01:00
var current_target = null
func set_position(position: Vector3):
transform.origin = position
func move_towards(direction_times_speed: Vector3):
move_and_slide(direction_times_speed)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 21ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API