Dive Board
-
autowalk solved
autowalk solved
by crow34 on Jan 5th, 2015 07:12 AM
I found a solution that allows developers to autowalk like the Tuscany dive demo
Place a sphere above or below the main camera and create a autowalk.cs with the following script
And you will need to apply a character controller and a fpscontroller
https://www.dropbox.com/s/2r8j7xp56pupv ... lk.cs?dl=0using UnityEngine;<br />using System.Collections;<br /><br />public class Autowalk : MonoBehaviour {<br /><br /> private CardboardHead head;<br /> private Vector3 startingPosition;<br /> private float delay = 0.0f; <br /><br /> void Start() {<br /> head = Camera.main.GetComponent<StereoController>().Head;<br /> startingPosition = transform.localPosition;<br /> }<br /> <br /> void Update() {<br /> RaycastHit hit;<br /> bool isLookedAt = GetComponent<Collider>().Raycast(head.Gaze, out hit, Mathf.Infinity);<br /> // if looking at object for 2 seconds, enable/disable autowalk<br /> if (isLookedAt && Time.time>delay) { <br /> GameObject FPSController = GameObject.Find("Head");<br /> FPSInputController autowalk = FPSController.GetComponent<FPSInputController>();<br /> autowalk.checkAutoWalk = !autowalk.checkAutoWalk;<br /> delay = Time.time + 2.0f;<br /> }<br /> // currently looking at object<br /> else if (isLookedAt) { <br /> GetComponent<Renderer>().material.color = Color.yellow; <br /> } <br /> // not looking at object<br /> else if (!isLookedAt) { <br /> GetComponent<Renderer>().material.color = Color.red; <br /> delay = Time.time + 2.0f; <br /> }<br /> }<br /> <br />}
crow34
Posts: 21
Joined: 29.01.2014
Re: autowalk solved
by Juju on Jan 6th, 2015 23:33 PM
Hey, thaks for the solution, this is exactly what I was looking for.
I'm a total beginner with Unity and I am writing an Cardboard App very similar to the Tuscany dive app. Could you please tell me how I create the fps controller and the charactercontroller and what I have to write into these scripts?
Thanks alot.Juju
Posts: 1
Joined: 06.01.2015
Re: autowalk solved
by crow34 on Jan 7th, 2015 10:16 AM
It appears that bacongames has beat me to the finish line
Search the asset store for no click GUI this will provide you with a working autowalk featurecrow34
Posts: 21
Joined: 29.01.2014
Re: autowalk solved
by monome on Jan 15th, 2015 03:55 AM
Hey everyone for some reason I am getting a compiling error. Any ideas. Could someone possible post a pre built character for me to take a look at? Thanks for any input.
monome
Posts: 1
Joined: 15.01.2015
Re: autowalk solved
by Refref1990 on Aug 9th, 2015 20:16 PM
Hi! I have created a game with the autowalk, but i want who the circle with the script be under my feet, like tuscany dive. But when i put the circle under my feet, in the same folder of the cameras, this follow my head, so when i try to see, the cirlce go behind my head. Any solutions?
Refref1990
Posts: 5
Joined: 09.08.2015
Re: autowalk solved
by Glocksilverna on Oct 5th, 2015 06:31 AM
A point that I was interested in a joint comment.
Glocksilverna
Posts: 2
Joined: 05.10.2015
WW
by mtom78632 on Jul 18th, 2021 13:09 PM
Can I recently say that of a relief to discover someone that actually knows what theyre talking about over the internet. You actually discover how to bring a challenge to light to make it important. The diet have to look at this and fully grasp this side on the story. I cant think youre no more popular since you absolutely possess the gift. agen sbobet
mtom78632
Posts: 728
Joined: 23.08.2020
mtom
by mtom78632 on Jul 31st, 2021 07:44 AM
[color=#000000][size=2][font=Verdana, Geneva, sans-serif]I am often to blogging and i also really appreciate your content regularly. Your content has really peaks my interest. I am about to bookmark your site and maintain checking for first time data. [color=#0000aa]http://localizarnumero.com[/color][/font][/size][/color]
[color=#000000][size=2][font=Verdana, Geneva, sans-serif]---------------[/font][/size][/color]
[color=#000000][size=2][font=Verdana, Geneva, sans-serif]I used to be recommended this blog by means of my cousin. I’m not sure whether or not this publish is written by means of him as nobody else realize such distinct about my problem. You’re wonderful! Thanks! [color=#0000aa]420 for sale perth[/color][/font][/size][/color]mtom78632
Posts: 728
Joined: 23.08.2020
Re: autowalk solved
by mtom78632 on Jul 31st, 2021 13:18 PM
I can’t really help but admire your blog, your blog is so adorable and nice . Interior design
mtom78632
Posts: 728
Joined: 23.08.2020
Re: autowalk solved
by mtom78632 on Sep 23rd, 2021 15:38 PM
I like this blog so much, saved to my bookmarks . develeper practice Test
mtom78632
Posts: 728
Joined: 23.08.2020
RECENT TOPICS
Enhance Your ISC2 CCSP Exam Prep with Dumpsvibe Exam Resources
الاعتماد على تكييف شارب لتبريد مثالي وموثوق
Online guide to Istanbul
STATISTICS
Total posts: 171533
Total topics: 41568
Total members: 44826
Newest member: Daniel G.
Rencontrez la famille Durovis Dive et transformer votre appareil mobile en un casque de réalité virtuelle. jeux d'expérience et 360 vidéos ° en VR sur votre propre smartphone ou tablette.