Hololens camera animation pathing issues - c#

When using the unity editor all animations tied to the camera work, but when build and deployed onto the hololens the animation wont process(being overridden by real life coordinates), the way to get around this is by attaching it to a random gameObject. My issue is giving the user the ability to roam around space whilst tying animations and force movements to the cameras parent(empty gameObject).
I have tried making the gameobject stay where the camera is but obviously this just makes for constant motion.
Is there any way to keep the cameras parent exactly where the camera is in order to stop the animations going glitchy?

Related

Im trying to recreate spider square in unity but i cant figure out how to make the web

As stated in the title. I will include a video of what I'm trying to make. I'm not sure how to make the part that the player swings on.
https://youtu.be/Z_RVr0nFpVE
Description of the mechanic: when the player taps a "web" is created that goes from the player to the roof at a slight angle forward. This web gets shorter over time. When the player stops tapping the web goes away.
I’m sure that there is no physical rope or string simulation. The easiest way is to slow the horizontal speed down, add decelerating up-directed velocity, and draw a rope from the origin to the player. After parameters adjustment the result should look similar to what you’ve shown.

Unity NavMeshAgents snap to outskirts of NavMeshSurface during runtime

I'm having some interesting behaviour with NavMeshAgents. So I've been working on a project for the past few months which is revolving around creating believable enemy AI systems for stealth games. When the player kills an enemy they can pickup the body and put it into a body bag, this all worked well and fine for a while but now once the player has picked up two corpses all Nav Agents do this.
They are still in their patrol state (using a behaviour tree) and all of the AI have a destination set which can be seen on the debug tools for the Agent. However if I try to move the AI whether that being dragging them around or setting a position through the inspector they will snap back to a corner of the NavMeshSurface.
Using Unity 2021.1.17f1 and using the latest compatible version of the NavMeshComponents package provided by Unity.
Things I've tried:
Changing Radius and Height of agents
Setting the floor and such as navigation static objects
Removing the NavMeshComponents package scripts and replacing them with the original NavMesh system. Didn't work and took a lot longer to build the NavMesh
Interesting behaviour:
The amount of body bags the player has to pick up seems to be related to how many AI are in the scene. For example currently there are 23 AI and it takes two body bags for this glitch to happen, but if there are 24 to 31 AI in the scene then it requires three body bags to be picked up for it to happen.
All calls to the NavMeshAgent are done through a AILocomotion script which handles enabling and disabling rotation, movement and updating the animation. Movement is only disabled upon death or when the AI is in the wait state, other than that every Move based state re-eneables movement.
Update: Found the solution
It turns out Unity does not like it when you destroy a NavMeshAgent component during runtime. Now when the player picks up a corpse it leaves the NavAgent behind but destroys the mesh and colliders etc.

How to create multiplayer / shared AR game with Vuforia?

I would like to create a shared AR game on Android phones, where I would like to:
spawn a cube for each player on an ImageTarget
allow them to control the position of their cube
allow them to see the movements of all players' cubes
I'm using Vuforia as my AR library and PUN 2 as my networking library. I have no issue synchronizing the positions and rotations of all cubes. However, the cubes do not stay on the ImageTarget properly and "jump" around. On the other hand, if I place my two phones very close together and point them at the ImageTarget at roughly the same angle, the cubes do not jump as much.
This leads me to think that the 2 instances of ARCamera fail to realize that they are pointing at the same ImageTarget from 2 different angles, and instead think that the ImageTarget exists in 2 different orientations at the same time.
Is there any way for me to tell Vuforia that I'm using multiple instances of ARCamera pointing at the same ImageTarget? (Or if my hypothesis is completely wrong, how do I actually make a multiplayer AR game?)
Thanks so much in advance!
p.s. I know the Vuforia forums are a better place to ask this question but unfortunately that forum is not particularly active, so I'm trying my luck here.
I've solved the issue by going to the ARCamera gameobject, then in the Vuforia Behavior component, I changed the World Center Mode from DEVICE to FIRST_TARGET. This allows multiple instances of ARCameras to be in different positions.
More info on World Center Mode can be found here.

How to stop my Character's left arm and gun from rendering twice when he starts running fast?

So initially I had trouble with my character's left arm and gun clipping through objects(not entirely though) and I followed the instructions in this unity3D post to fix this issue(Read through the top answer so you know what I did).
Solution for FPS gun clipping through walls
Now I'm having trouble figuring out how to stop my player left arm and gun from rendering twice when he starts running fast(Doesn't occur when I'm just walking or slightly running). I know it has something to do with there being two cameras but I need an additional camera to stop the gun and the player's arm from clipping through objects.
Here is a picture that shows what I mean.
IF you look closely, you can see that the AK-47's magazine is being rendered twice(there is very small gap there) as well as the left arm. I've fiddled with both camera settings and could not figure out a way to stop this from happening. How do I go about fixing this issue?
You need to disable the gun layer from rendering with the first camera. The gun layer should only render on the second camera.

Goblin XNA -- Creating a labyrinth style game

Anyone know how to use Goblin XNA to implement ball control in the same way as one might find in the board game labyrinth?
There don't appear to be any tutorials or information at all regarding how to do this, despite there being a demo video displaying just such a thing.
I've setup the environment and gravity and added the ground and a sphere. I use WorldTransformation.Decompose to extract the current orientation of the board. I know the next step will be either ApplyLinearVelocity or AddForce to the sphere based on the current board orientation, but I don't know how to constantly apply these methods to the ball so that the ball is moving in response to the movement of the ball. Adding code to the Draw or Update methods only executes the code a single time. Anyone familiar with Goblin XNA at all and able to help?
As far as I can see in Goblin XNA the Update and Draw methods are called the same way as standard XNA games. Can you give more specific information? source code perhaps?

Categories