13 years ago

Artificial Intelligence JavaScript Unity 3D


Advanced artificial intelligence in javaScript

#pragma strict

var alvo : GameObject;

var pos : Vector3;

var dist : float;

function Start () {

alvo = GameObject.Find (โ€œPlayerโ€);

dist = 6;

}

function Update () {

pos = alvo.transform.position;

if(alvo && Distancia ()){

var alvoRotacao = Quaternion.LookRotation (pos - transform.position , Vector3.up);

transform.rotation = Quaternion.Slerp (transform.rotation , alvoRotacao , Time.deltaTime * 3);

}

}

function Distancia (){

if(Vector3.Distance (transform.position , pos) > dist){

return false;

}

else{

return true;

}

}



0 comments

Loading...

Next up

Did you know that today is #InternationalJazzDay? ๐ŸŽท๐Ÿ˜Ž

No? ๐Ÿ˜ฏ Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? ๐ŸŽท

Let us know what you think about it and have a great weekend!

Chiaki Nanami!

"Thanks guys for endless hours of fun." ๐Ÿ‘

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

A Shiny Mega Gengar ๐ŸŒŸ For @ManutkArt 's #ThreeColorsChallenge!

Regular exercise is key for healthy wings.

Try it out!

https://gamejolt.com/games/AeonNightmares/605184

I worked so hard to get all four of them to the end safely, but then...

Some time ago, we posted a screenshot of the Mexico level. A curiosity about it is that, like some other scenarios of the game, it was inspired by a real landscape, The Basaltic Prisms of Santa Marรญa Regla. It is one of the natural wonders of the country!

Here's a Fredbear sprite i made in Aseprite! I'm pretty proud of this!

(Btw, sorry for the double post! I'll try to post less)

The Authority decided to investigate the Basement and leads to recovering classified documents Fun fact: The building has 928 doors and not 1000 doors. #horror