Albert / VR-Design-Haikus

Rapid prototyping for VR design concepts
0 stars 0 forks source link

Super Punch #3

Closed Albert closed 6 years ago

Albert commented 6 years ago

Make full world completely black (i think you remove skybox and camera bg color should be black) punchSensor.cs have a Vector3 as a private int each frame add controller's current position (something like myList.Add(transform.position)) if list gets to 5 or more frames in length, remove the first element in the list (i think it's myList.removeAt(0)) if the vector3 distance between last el in list and first el in list is 0.1 units or greater, activate effect... Play w/ that variable to make something that feels about right...

effect is a thunderclap sound effect plays (freesound.org, some sort of thunderclap w/ a "creative commons" license) black world pops to white for 5 frames, then back to black

andpeterson commented 6 years ago

Interesting concept, sounds fun

andpeterson commented 6 years ago

There are two ways to do this. One will keep an array list you are saying and will compare the beginning and the end. This would possibly lead to a more accurate magnitude though taking the last position and comparing that to the current position gives you the ability to divide them by time.deltaTime giving you a possibly less accurate velocity but will give you the actual speed rather than 'relative speed'

Maybe there may be a way to get the best of both worlds... to be looked into later

andpeterson commented 6 years ago

Finished base requirements

Albert commented 6 years ago

Hah, perfect. This feels great.