Quantcast
Channel: Answers by "Motionreactor"
Browsing all 32 articles
Browse latest View live

Answer by Motionreactor

You can cast a ray in a specific direction like this:var hit : RaycastHit; var ray : Ray = Ray(gameObject.transform.position, Vector3.forward); if(Physics.Raycast(ray, hit, 10)) {...

View Article



Answer by Motionreactor

Check out the standard assets: Camera Scripts > SmoothLookAt

View Article

Answer by Motionreactor

Whilst I'm not sure why your controller was heading skyward (y axis)... the problem you have is this:controller.Move()I don't know the innards of the Move() function, but basically it seems to be...

View Article

Answer by Motionreactor

Luckily the Unity team have made this really simple:var dataString: String; var url = "http://www.mysite.com/data.txt"; function Start () { // Start a download of the given URL var www : WWW = new...

View Article

Answer by Motionreactor

You can't 'write' to the control keys... but you can read them:function Update () { if(Input.GetKeyDown(KeyCode.LeftControl)) { // do something } }You can get the names of these keys...

View Article


Answer by Motionreactor

http://www.blender.orghttp://www.cheetah3d.comhttp://wwww.wings3d.comI personally use Blender and love it. It is just going through a bit of an overhaul to version 2.5, but version 2.49b is perfectly...

View Article

Answer by Motionreactor

You are on the right track but forgot a couple of things. Your algorithm will actually vary the rotation as each cube will show discrepancy in rotation over time. The problem is that they will always...

View Article

Answer by Motionreactor

I'd suggest a combination of ray casting for hit detection and particles (without any form of collider) as the visual effect. You don't always have to do things the 'natural logic' way in gaming.The...

View Article


Answer by Motionreactor

Ok, I've written a complete script for you because I thought it important to help illustrate a more flexible approach to the problem:Drop this script onto the elevator:var elevatorSpeed : float; var...

View Article


Answer by Motionreactor

I would strongly suggest you use triggers:http://answers.unity3d.com/questions/4175/moving-teleporting-player-and-camera-when-they-enter-a-certain-areaRather than using colliders in that way, which btw...

View Article

Answer by Motionreactor

Please refer to:http://answers.unity3d.com/questions/5045/using-a-gui-button-to-stop-a-gameobject-movementYour other question for a related solution.

View Article

Answer by Motionreactor

You can get the position of a 3D object in relation to the 2D screen with: Camera.WorldToScreenPointThere is a related wiki entry which is fairly verbose, but is exactly what you want: Here

View Article
Browsing all 32 articles
Browse latest View live




Latest Images