I'm developing a car game for Gear VR in unity. I'm currently facing a problem where the car spins upon collision. So far I've tried freezing the position and changing the angular drag to a larger value. Freezing problem doesn't solve the issue since the car stop turning completely on turns. Can anybody please advise any other solution.
I'm using unity standard asset for the car physics.
I resolved the issue via scripting. On collision with wall, I just set the angular velocity of the car to Vector3.zero.
Related
I'm thinking about building a ringfit adventure-like game for VR. But I have no idea to track running motions. If you know the official game, you know, you can move forward by running in place. Any ideas?
I am currently self-learning steering behaviors and am following this lecture I had found which gives a really good introduction about AI implementation aka https://edirlei.com/aulas/game-ai-2020/GAME_AI_Lecture_07_Steering_Behaviours_2020.html.
I've faced an issue when trying to implement the 'Seek' behavior in a 2D game environment in which the 'seek' game object does not try to move towards its target. There are no errors showing in the console but my best guess is that it's because of the use of Rigidbody in the 'SteeringBehaviorBase' class code. I've tried converting it to Rigidbody2D instead but sadly it still does not move.
For further context, I've attached the 'SteeringBehaviorBase' and 'SeekBehavior' classes onto my 'seek' game object and a circle collider on my 'seek target' game object. I've also set the reference of the seek target property in the 'SeekBehavior' code to the 'seek target' game object.
I would really appreciate anyone's help in guiding me to solve this problem.
In unity 5 I am having an issue with certain collisions. I made a basic maze-like game where the player controls a cube across platforms (made from other cubes). In certain areas, two or more of the platforms touch so the player can get to different areas of the level. The problem with my collision happens at these intersections. The player will seem to get stuck for no reason and they would have to back up and get a running start in order to get to the other platform. I went through everything and made sure they are lined up perfectly in the unity editor but nothing seems to fix this.
Any advice would be greatly appreciated .
EDIT: all of my objects are using box colliders
A common (and good) practice is to use a Circle collider on the bottom of your character object in conjunction with a Box collider.
For Example:
While this will likely fix your issue, the source of the problem is probably using many small tiled cubes each with their own colliders. A large amount of tiled objects with colliders most likely cause performance and collision issues.
I want to make a plank game in VR with Unity. So when the player walk outside of the plank, he falls. Right now the only way to make it work is by using VRTK which is another physics system and it makes a lot of things complicated.
I've put a rigidbody on the CameraRig and uncheck "is kinematic". The player falls, but the colliders on other objects are not working anymore...
Is there a way to use Unity's physics with SteamVR and without VRTK ??
Thank you !
Firstly I would read up on Rigidbodies and Colliders/Trigger Colliders - here's a link.
Here's a useful table from that website:
You will need to use this to understand why the player is falling. Is the CameraRig actually colliding with the ground? Is it a Trigger Collider (which has a callback method but doesn't do any physical collision). There's many possibilities for why.
I wrote a script that you can drag in two objects and see if they collide. You could use that if it helps.
The issue in VR with Vive is that determining where someone walks can be difficult, as we are only tracking their head and their hands. If you have a Vive Tracker available and it fits your use case you could use that to track someones foot.
What I have done in the past is use the Camera(eyes) GameObject within the CameraRig and get it's transform.position.x and transform.position.z value to determine if it has gone outside of the boundaries of the object the user is standing on.
Hope this helps,
Liam
I am new to Unity and am trying to create a simple 2d platformer. I have applied a box collider to my player sprite and the floor/platform its standing on. Now when I go over the platform, it toppes off of it as expected, but I want it to simple fall off it instead of toppling. How can I do this?
Also I saw a video of Unity Live Training in which he was using a separate circular collider for the player's feet.When I did this ,the sprite started rolling. Can anybody help me with this?
There is an "fixed angle" option on Rigidbody2D component, try enabling that