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

This Satuday we invite to watch another #speedpainting of our artist Daniel Faiad.

How great is this scene of #Pecaminosa?

#ScreenShotSaturday | #IndieDev | #DigitalArt

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!

๐Ÿ’Did you like the game? A demo is available for free on Steam.

โœŒ๏ธ Thanks for playing IndieGameiacs!

โš™๏ธ Free Demo: http://bit.ly/UniDuni

๐Ÿ“บ Full Video: https://youtu.be/5qEbVXg7GaQ

#steam #uniduni #clops #screenshotsaturday

Sometimes the suction cup get sticky. Small animation I made in Blender after doing my tutorial on picking up/dropping objects in animations. Crate model by jQueary (https://sketchfab.com/3d-models/game-ready-sci-fi-crate-d98deca6โ€ฆ).

Finished work on the emotions of a new character for the tank universe

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated โœŒ๏ธ

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

brung back my old oc plus a new one

...they don`t have names yet tho

Levels' maps.

I did this on my 3DS ^^ #Kirby

Only true badasses may pass! #conceptart #art #gamedesign