i am working on a small project for mostly learning ue4 und vr stuff. I am working with the vive, but the game should run under the oculus, too.
My kidz are sticked to this bottleflip game and i want to try to do the same experience in vr.
The game target is to throw the bottle this way, that it stands on landing. Easy? Easy. If you’ve done it correctly. And than you should do the DAB. But this comes later.
What i’ve done so far:
Setup for VR via UE4 v4.14
Setup of the bottle physics incl. physics material
Setup of the collision box of the bottle (one main problem)
Where i don’t get into:
code a perfect bottle turn to improve the experience for beginners (other main problem)
It would be great, if anybody could help me with these issues.
1. Setup of collision box
Actually i got this collision box:
This works good for the moment. But when the bottle hits one of the sharp edges of the bottom, it jumps uncontrolled away, respectivly get more velocity than it should have left.
So i tried to use the Collision Complexity “Use Complex Collision As Simple” to get the perfect collision model.
If i did this … this happens when i pressed play:
Ok, this should be a bug. But is anyway around it? Custom Collision did only 32 with the same problems and artifacts at the bottom, which is terrible for the bottle flip game.
Any suggestions? Thx if you do!
2. Making the perfect bottle flip
I tried a lot preferences with the bottle and i am fine with its standard behaviors. The bottle is a little bit to heavy (2kg) but jumps to much with 450gr for a real bottle with a little bit of water inside.
I don’t know the following:
**How could i emulate the water inside the bottle, which is important for the behaviour of the bottle, when she is in the air. **
- My Idea was to lower the center, to emulate the water sticky to the gound. This helps when it comes to the landing, but is not valid for the flying and throwing physics.
- Second idea was to animate the center of mass, but …
QUESTION: How did i calculate the center of the mass animation with the fly of the bottle. (Velocity, Gravity, Forward Movement, etc.)
3. How could i manipulate the fly of the bottle
I want to help the player if he is a beginner. If he throws the bottle, the system should correct the flight to get a perfect landing. Should i do this with velocity impulses and how could i calculate the vector for the right position to push the bottle correctly. I felt a little bit like a rocket scientist, because they got the same problems with their rockets :).
It should be possible to calculate the perfect flight right in the moment, it loses the connection to the VR-hand. With a integer from 0-1 i want to adjust the help from the computer, to help beginners and to get a perfect standing bottle.
Or only to show the gamer the perfect degree as a bow for the throw. (Yeah, it rhymes. :))
Last but not least, i am doing everything with blueprints. I am no coder :).
I appreciate all help and this great forum in general. Thanx for all the support and this great free engine.
Have a nice day and thx for reading!!!