preik.net - Unity3D Page
On this page I'll post tutorials or files etc that I make related to Unity3D. Unity3D is a game engine which provides a way to (fairly) simply make and publish your own 3D games (to a browser, or to Windows/Mac etc). It's kind of like Gamemaker (I think at yoyogames now), but for 3D.
Quaternion Project - This project so far contains a scene with AI vehicles that follow each other around. The main thing I was working on was how to get an object to turn left or right based on it's position and orientation or heading, and a target object. Unity3D has built in functions which will alow you to turn an object fo face another automatically, but I needed a simple left/right mechanism so I could send steering commands from the AI to the car. I got a lot of help from the Unity3D community forums, and many thanks to capnbishop, bunzaga, Frido, and runevision(and whomever else I missed) there.
The final bit of code is: whichWay=Vector3.Cross(transform.forward, myTarget.position-transform.position).y;. Basically turn right on a positive value and turn left on a negative value (or a zero to cover everything...because a zero could be behind you).
Other Unity3D Related Stuff:
HIVE-O-TRONMy Arcade Shooter, featuring the potential for crazy high scores!
Peg Game My rendition of the peg jumping game (like in Cracker Barrel)
Remora Helicopter Game Tests VERY early look here, but I think things are coming along.
Simple Kart Another Unity Test Game
Thrust! (Unity Webplayer test game)
Home