|
Hi all, I'm working on a Planet like prove of concept. I'm using Rune's locomotion system Physics Character Controller to move my player and the NPCs. The player has also the Platform Character Controller to capture the input and move the player, but for my NPCs that need to follow my player. I'm using Rune's AI Follower script but is not working well on the planet surface. I believe it is because it assumes that the NPC is moving on a flat terrain. If anybody can help me updating the script to work on a planet like surface, I'd really appreciate it. Here's my current script. I'm calling the Follow() and Stop() methods from another script when the player is in range.
(comments are locked)
|
|
Hi, I just made it work. I needed to make the direction vector relative to the NPC's own orientation and I removed the Util.ProjectOntoPlane() function and it is working pretty well. If you are creating a planet like game, and you are using Rune's locomotion system, this will make your NPC's follow your character around the planet. Just to clear things out, you don't need to use locomotion (I'm not using locomotion for my NPC's, just for the player). For the NPC's I'm using Rune's PhysicsCharacterMotor.cs (which uses the CharacterMotor.cs). The NPC's also have a CapsuleCollider, a RigidBody, the FollowerController I created based on Rune's Follower script and one extra script to call the Follow() and the Stop() methods of the FollowerController script. Hope is helpful for other people. I was working on something not exactly related but your answer actually helped me too. I was trying to send the character to a specific point and it would not go there in a nice way. That was because I forgot to make the direction vector relative to the character orientation too.
Jul 24 '11 at 03:39 PM
Bishop
(comments are locked)
|

Rune, if you are able to check the script and help me out I'd really appreciate it. Basically just need to modify your Follower script to make it work in a Planet like surface. Thanks