Home Game Development Ai bots for cocos creator 3d – Cocos Creator

Ai bots for cocos creator 3d – Cocos Creator

0
Ai bots for cocos creator 3d – Cocos Creator

[ad_1]

Hi, anybody tried to create a bot for a capturing sport? Please assist to start this work. thanks :slight_smile:

Hi,

I’ve only in the near past created a 3D enemy for my sport you may take a look at right here:

What I’ve accomplished is create a node and put my mannequin of the enemy in that node. I’ve then created one other node referred to as waypoints beneath the primary node. I’ve then made some extra nodes in waypoints referred to as waypoint1, waypoint2 and so on. I’ve connected my script to the primary mode. I then make the mannequin lookat() the node by randomly deciding on which node to take a look at. Then impulse the mannequin ahead. When the mannequin turns into a sure distance from the node I then have a look at the following node and impulse forwards. I’ve put a pause in. When the character turns into a sure distance the enemy will lookat the character and impulse ahead. When the gap turns into too massive the enemy goes again to the waypoint cycle.

This is a reasonably easy approach of doing it, if you wish to make it extra percise a* pathfinding is what to look into. I did see a tutorial for that on the boards.

Hope this helps.

That’s very nice. Please clarify to me the way you implement that.

You can confer with this framework, there may be an built-in habits tree for making ai :

I checked the mission and it’s not operating with a lacking script error. It’s displaying.



[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here