Slide 1

Slide 1 text

ूதߨ࠲ͦͷ3
 ϓϩ͕ڭ͑Δ୤ॳ৺ऀεΫϦϓτज़ʂ ϢχςΟɾςΫϊϩδʔζɾδϟύϯ ϑΟʔϧυɾΤϯδχΞ ҆ݪ ༞ೋ

Slide 2

Slide 2 text

෺ཧΛ࢖ͬͨ ूதߨ࠲ͦͷ3
 ϓϩ͕ڭ͑Δ୤ॳ৺ऀεΫϦϓτज़ʂ ϢχςΟɾςΫϊϩδʔζɾδϟύϯ ϑΟʔϧυɾΤϯδχΞ ҆ݪ ༞ೋ

Slide 3

Slide 3 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ຊ೔ͷ͓͸ͳ͠ •ಈ͖Λ࡞ΔςΫχοΫ • ϓϥϯφʔɺΞʔςΟετ͞Μʹ΋໾ʹ ཱͭ΋ͷ

Slide 4

Slide 4 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ຊ೔ͷ͓͸ͳ͠ •࣮ԋ͋Γ •࣮ԋ಺༰΋ࢿྉʹೖΕͯ͋Δ •ϝϞΛऔΔඞཁ͸ͳ͠ʂ

Slide 5

Slide 5 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ຊ೔ͷ͓͸ͳ͠ •঺հ͢ΔϓϩάϥϜ͸ͱͯ΋γϯϓϧ • ॲཧΛྻڍ͢Δ͚ͩ • if จ͢Βॻ͔ͳ͍

Slide 6

Slide 6 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ຊ೔ͷ͓͸ͳ͠ •ʮ͋ͱͰ΍ͬͯΈΑ͏ʂʯ •ͱࢥͬͯ΋Β͑ΔΑ͏ʹ͕Μ͹Γ·͢ʂ

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ ·ͣ͸γϯϓϧʹ ΩϟϥΫλʔΛ ಈ͔ͯ͠ΈΑ͏

Slide 10

Slide 10 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 11

Slide 11 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 12

Slide 12 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 13

Slide 13 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 14

Slide 14 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ InputManager ͰೖྗΛγϯϓϧ ʹ͓ͯ͜͠͏

Slide 15

Slide 15 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 16

Slide 16 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Time.deltaTime Λ࢖͓͏

Slide 17

Slide 17 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtʹ͍ͭͯ෮श

Slide 18

Slide 18 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ήʔϜ͕ಈͬͯ͘Ͳ͏͍͏͜ͱʁ ࣌ؒ ࡉ͔͍ॲཧΛ܁Γฦͯ͠ಈ͖Λ࡞͍ͬͯΔ ॲཧʢUpdateʣ ɾɾɾɾɾɾɾɾɾɾɾ

Slide 19

Slide 19 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtͱ͸ ࣌ؒ ͻͱͭͷॲཧʹ͔͚Δ͕࣌ؒΔt Δt

Slide 20

Slide 20 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtͱ͸ ࣌ؒ ͻͱͭͷॲཧΛ̍ϑϨʔϜͱݺͿ Δt

Slide 21

Slide 21 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtͱ͸ ඵؒ20ϑϨʔϜͷ৔߹ Δt 1ඵ 20ϑϨʔϜ

Slide 22

Slide 22 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtͱ͸ Δtͷฏۉ͸1/20ඵ Δt 1ඵ 20ϑϨʔϜ

Slide 23

Slide 23 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Δtͱ͸ ͭ·ΓɺΔt͸ඵؒϑϨʔϜ਺ͷٯ਺ Δt 1ඵ 20ϑϨʔϜ

Slide 24

Slide 24 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ Δt ΛϓϩάϥϜʹ૊Έࠐ΋͏

Slide 25

Slide 25 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ FixedUpdate Λ࢖͓͏

Slide 26

Slide 26 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 27

Slide 27 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ʲ֮ॻʳ Update ͸̍ඵؒʹԿճݺ͹ΕΔ͔Θ͔Βͳ͍ʢੑೳ͕௿͍؀ڥͩͱ গͳ͘ͳΔʣ →FixedUpdate ͸̍ඵؒʹݺ͹ΕΔճ਺͕ݻఆ Time.deltaTime ͸มಈ͢Δʢಉ͡ϑϨʔϜ಺Ͱ͸ݻఆʣ →Time.fixedDeltaTime ͸஋͕ݻఆ FixedUpdate Λ࢖͏ͱγϯϓϧʹʂ Δt ͸ Time.fixedDeltaTime

Slide 28

Slide 28 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ Rigidbody Λ࢖͓͏

Slide 29

Slide 29 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 30

Slide 30 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 31

Slide 31 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ AddForce ʹೖྗ஋Λ ͦͷ··ೖΕΔ

Slide 32

Slide 32 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 33

Slide 33 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ Drag Λ࢖ͬͯ෺ମΛࢭΊΑ͏

Slide 34

Slide 34 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 35

Slide 35 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Drag Λ੍͢Δ΋ͷ͸ Rigidbody Λ੍͢Δ

Slide 36

Slide 36 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Ұఆͷ֎ྗΛՃ͑Δͱɺ͋Δ଎౓ʹऩଋ͢Δ v t

Slide 37

Slide 37 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࠷ऴతͳ଎౓ɺͦΕ͕ऴ୺଎౓ v t

Slide 38

Slide 38 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ऴ୺଎౓Λࢉग़͢Δهࣄ͕͋Γ·ͨ͠ʂ

Slide 39

Slide 39 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN http://qiita.com/yuji_yasuhara/ items/1f438f0f27f5ef854a73

Slide 40

Slide 40 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ྗɺ࣭ྔɺυϥοά͕༩͑ΒΕͨͱ͖ͷऴ୺଎౓ v’ m:࣭ྔ k:υϥοά F0:֎ྗ v’:ऴ୺଎౓

Slide 41

Slide 41 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ऴ୺଎౓ v’ ΛಘΔͨΊͷ֎ྗʢ୯ͳΔࣜͷมܗʣ m:࣭ྔ k:υϥοά F0:֎ྗ v’:ऴ୺଎౓

Slide 42

Slide 42 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 43

Slide 43 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN v t

Slide 44

Slide 44 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN όωΛѻ͓͏

Slide 45

Slide 45 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN όωͱ͸ɺڑ཭ʹൺྫ͢Δྗͷ͜ͱ ऑ͍ ڧ͍

Slide 46

Slide 46 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN όωΛϓϩάϥϜͰॻ͘ void AddSpringForce(Vector3 target_position, float r) { var diff = target_position - transform.position; var force = diff * r; rigidbody_.AddForce(force); }

Slide 47

Slide 47 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Φʔόʔγϡʔτʢ໨ඪϙΠϯτΛ௨Γա͗Δʣ x t

Slide 48

Slide 48 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Φʔόʔγϡʔτ͠ͳ͍όω܎਺ Λ஌Γͨ͘ͳΔ

Slide 49

Slide 49 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Φʔόʔγϡʔτ͠ͳ͍৚݅ m:࣭ྔ k:υϥοά r:όω܎਺

Slide 50

Slide 50 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ʲ֮ॻʳ

Slide 51

Slide 51 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ճసΛ࢖͓͏

Slide 52

Slide 52 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN AddTorque Λཧղ͠Α͏

Slide 53

Slide 53 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN τϧΫ͸෺ମΛճసͤ͞Δྗ

Slide 54

Slide 54 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN AddForce ͸Ґஔ AddTorque ͸ճస

Slide 55

Slide 55 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN τϧΫ͸ ճస࣠ͱେ͖͞Ͱද͢

Slide 56

Slide 56 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN AddTorque(new Vector3(2, 0, 0)) ͸ X࣠ʹରͯ͠2ͷτϧΫ

Slide 57

Slide 57 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN τϧΫͷ͍͢͝ͱ͜Ζ ॏͶͯʢ଍ͯ͠ʣ΋େৎ෉ʂ

Slide 58

Slide 58 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ ඈߦػͷૢ࡞Λ࡞ͬͯΈΑ͏

Slide 59

Slide 59 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 60

Slide 60 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ Input.GetAxis Ͱ AddTorque

Slide 61

Slide 61 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 62

Slide 62 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN Ϥʔ(yaw) ϐον(pitch) ϩʔϧ(roll)

Slide 63

Slide 63 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ϩʔϧͯ͠͠·͏໰୊

Slide 64

Slide 64 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ੵΛ࢖͓͏

Slide 65

Slide 65 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ੵͱ͸ɾɾɾ •֎ੵͷ݁Ռ͸ϕΫτϧʂ •AxB ͱදه͢Δʢ͜ͱ͕ଟ͍ʣ •x͔ͩΒΫϩεੵͱ΋ݺͿɻӳޠͰݴ͏ͱ cross product •Unity Ͱ͸ Vector3.Cross ͱ͍͏ؔ਺ •var C = Vector3.Cross(A, B); ͱॻ͘ͱɺ ϕΫτϧC͸AxBʹͳΔ •ϕΫτϧ A:(Ax, Ay, Az) ͱ B:(Bx, By, Bz) ͷ֎ੵΛ C:(Cx, Cy, Cz) ͱ͢Δͱ Cx = AyBz - AzBy Cy = AzBx - AxBz Cz = AxBy - AyBx ͳʹ΍Βਆൿతɾɾɾʂɹɹɹɹɹɹɹɹɹɹɹ

Slide 66

Slide 66 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ੵAxB ʢ AͱBͷ໘ʹਨ௚ɺ௕͕͞ฏߦ࢛ลܗͷ໘ੵʣ B A AxB |A||B|sinθ θ

Slide 67

Slide 67 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ݱࡏͷ޲͖͕Aͩͱͯ͠ɺBͷํ޲ʹ޲͚͍ͨͱ͖ͷτϧΫ͸ʁ B A

Slide 68

Slide 68 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN τϧΫ͸ճస࣠ɺͭ·Γ֎ੵͷํ޲ʂ B A

Slide 69

Slide 69 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ΄Μͷগ͔͕ࠩ͠͠ͳ͍ͱ͖͸τϧΫΛখ͍ͨ͘͞͠ B A

Slide 70

Slide 70 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ੵͦͷ·Μ·ͰɺΘΓͱόωͬΆ͘ͳΔʂ A AxB |A||B|sinθ B

Slide 71

Slide 71 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ֎ੵͦͷ·Μ·ͰɺΘΓͱόωͬΆ͘ͳΔʂ A AxB |A||B|sinθ B 90°Ҏ্Ͱ΋όω͕ऑ͘ͳΔͷͰ஫ҙ
 ʢAtan Λར༻͢ΔͳͲͰճආՄೳʣ

Slide 72

Slide 72 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 73

Slide 73 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 74

Slide 74 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 75

Slide 75 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 76

Slide 76 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ ศརؔ਺
 AddRelativeTorque

Slide 77

Slide 77 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 78

Slide 78 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ ඈߦػͳͷͰ Ϥʔ͸ϩʔϧ͠ͳ͕Β

Slide 79

Slide 79 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ࣮ԋύʔτ COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 80

Slide 80 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN લਐʂ

Slide 81

Slide 81 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ऴ୺଎౓ v’ ΛಘΔͨΊͷ֎ྗʢ࠶ܝʣ m:࣭ྔ k:υϥοά F0:֎ྗ v’:ऴ୺଎౓

Slide 82

Slide 82 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 83

Slide 83 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN

Slide 84

Slide 84 text

COPYRIGHT 2016 @ UNITY TECHNOLOGIES JAPAN ͓͠·͍ ͜ͷߨԋͷUnityϓϩδΣΫτ͸ͪ͜Β͔Βμ΢ϯϩʔυͰ͖·͢ɿ https://www.dropbox.com/s/3aokgqnqs05sdyg/UnityDojoSpecial2016Yasuhara.zip?dl=0