This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public var forwardSpeed:Number; | |
public var steerAngle:Number; | |
public var rotationT:float = 0.25; | |
function FixedUpdate () { | |
var x:Number = Input.GetAxis("Horizontal"); | |
var y:Number = Input.GetAxis("Vertical"); | |
if (HitTestWithRoad()) { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 参考にしたソースコード: | |
// Prototyping Lab ―「作りながら考える」ためのArduino実践レシピ (Make:PROJECTS) [大型本] 小林 茂 (著) | |
// http://p.tl/RQFE | |
// | |
// 使ったArduino(本当はArduino Nano 3.1): | |
// Arduino Nano | |
// http://p.tl/1D1u | |
// | |
// 使ったセンサを含むキット: | |
// Prototyping Lab Kit Vol.1 スイッチサイエンス |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ddf.minim.*; | |
Minim minim; | |
AudioInput in; | |
float data; | |
int[] col = new int[8]; | |
float angle = 0.0; | |
float offsetAngle = PI / 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You should change the center of this gameObject's mesh from default value (0,0,0). | |
// Because this script put its point to the contact point with the ground. | |
// And "use gravity" must be FALSE. | |
// Call HitTestWithRoad() from Update() | |
public var distance:float = 2.0; | |
public var smoothRatio:float = 0.2; | |
function HitTestWithRoad() { |
NewerOlder