So I thought the lever would be the easiest one. I was wrong, I had made so many levers the word Lever looks incorrect to me, so many problems (mainly they would never pull or move in any way shape or form) This task was the reason I moved away from unity as a whole the process was complicated (feat. Avril Lavigne). I don't really understand why some things didn't work which was my main problem aka lack of understanding most of these development apps, which looking back on now I have come quite far in terms of understanding the program (I also still have super far to go) but having taken the steps i have for this project I'm quite proud of how my tasks have come out and looking at them and thinking oh I made that is a good feeling.
Anyways you came here for a lever so I shall deliver, The first thing I had to make was a blueprint interface for a grab and release component, This was quite simple as all i had to do was add functions and set them to be linked to the motion controller. The only difference between the grab and release was the name.
The next step was to build a lever i did this with static meshes and built a simple lever shape and added some textures to it.
This part was the simplest and is what i was able to complete on every program I had used, The next part which was the event graph was possibly the one i struggled with the most, i dont really understand why certain stuff didn't work, Ill add some photos on the end of my other code that didn't work as I'm not too sure why it didn't work but i struggled a lot with it.
The first part i created was the event grab and the event release and linked them up so they would do what they needed to do which was to help grab the lever and release the lever when the object is let go. I have struggled with the release of the lever and once grabbed the hand sticks to it, I have looked into a lot of videos online and cant figure it out, The event graph for these are below.
The other side of the event graph was created to allow the lever movement. This began with a validation node so that if grabbed it allows movement but until then it wont move. This involved a lot of get location and set rotation which is shown below.
After all this I could finally test the lever, I found through the testing the lever would grab and pull but letting it go was a problem as the hands would cling to it and not let go once grabbed, I went through my code and couldn't figure out why this is, i tried remaking the interface and a few other bits and tutorials online couldn't help me either. But anyways here is the test for my lever!
https://drive.google.com/file/d/17YhcUz55fumJoW6MoPKyAMOHR8aYCNx6/view?usp=shari...
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.