Move an object after grabbing in orbital motion to Camera - c#

I am trying to make a day night cycle in which Sun/Moon in front of the Camera and its grab able but only moves in orbit around the steam VR camera rig.
I am able to make that object grab able using VRTK (its a toolkit for vive) but how can i move it like as if it is orbiting the camera rig and dose not deviate from orbital path.
I have no idea where to start it,
honestly i have tried nothing because i do not know where to start it or how can i be able to do this
help needed...
thanks.

You have several options if you search online, here is an example that could help you out.
And here are some more ideas.
Referenced from here.

Related

How to make realistic shot in Unity

I'm just wondering how to make shots in my game more realistic. I mean there are two main ways in implementing shots. First: throw a small projectile and let it detect collisions. Second: use raycast. But in real world (and apparently I noticed this in PUBG) bullets fly really quick but not immediately. Here is why you should aim near your target if it's far away from you to hit it. Because if you aim right where it is it will move and your bullet will miss the target.
I'm just curious if any of you, guys have a nice solution to this problem. Also I wish to find a way to use raycast not every frame. In such things like detecting if you will actually hit the wall when shooting. If you have any good ideas how to implement spread and recoil for different types of weapons I will be happy to read them.
Blue point is bullet point of frame. and in very frame send a new raycast to check cross any human. like red line in this picture.
and bullet path use unity built-in Physics system to do it.

How to turn off Pathfinding in navmesh unity?

I use navmesh agent for my Isometric game (diablo like)
how then in all diablo-projects did they make it possible to rest against the wall?
how to off pathfind in nav mesh agent ?
I just want to hit the wall (or game object)
Example
ExampleInPoe
I tried everything, I can't figure out how to do it
You have to use NavmeshObstacles like explained here https://learn.unity.com/tutorial/navigation-basics#5c7f8528edbc2a002053b49c in Step 5.
So your navmesh basically ignores the wall - but the object prevents the player from passing. During runtime you can just remove the object and the path will be walkable.
Update:
In order to force the player to run into the wall (I assume when you say 'rest' against the wall you mean that), you could add a script that recognizes the player when they're close and then takes over their movement to let them smash the wall.
But this isn't a specific question anymore. So I'd rather recommend that you check out the Unity Tutorial section: https://learn.unity.com/search?k=%5B%22tag%3A5d351f087fbf7d006af48180%22%5D And try to get a better understanding of navigation and player movement in general.

Unity restricting Oculus Rift HMD to only allow for rotations and not position tracking

I want to lock the player position of the Oculus rift in unity to be in one place the entire time. They are able to move their arms but can look with their head, they also cannot lean or turn their body. For example if they are sitting in a chair the player is locked to that chair and they cannot move from it but they can interact with objects in front of the chair using the controllers.
I have no clue how to do this. Either through code or the inspector. Any solution will be greatly appreciated.
I have included a solution to this on a different question I asked and answered. Please see this post for a solution to this.

How to make camera shake when player collides with an obstacle?

I don't get how to make the camera shake when my player collides with the obstacle.
I can suggest you a lot of different ways to do it, depending on what you trying to do,
and what you already did...
Like, I can think you just started learning Unity and suggest you to use OnTrigger methods to detect collision with your player, then implement a method to apply a noise to your camera position.. But, is your cam a ThirdPerson one? FirstPerson? Fixed? 2D topdown? 2D platform? 2,5D?
Do you get it? Is important to follow the guide to Ask a Question... Try to answer these questions, saying what you already did, what you already tried and I'm sure you'll find help.

How to make a decal (How can I project a texture to a complex geometry?)

I'm currently working on my FPS game and going to make bullet holes(decals) but google doesn't help me at all. I cannot find the shader or any source that explains how to. If anyone did something like this one please help. Thanks in advance.
I take it you are casting a ray when you shoot? This way you can detect where it collides with a wall. If you have not done this, you should start there. When you know where the ray hits the wall you can create a flat plane on top of the geometry with your bullet hole texture on it including a alpha texture.

Categories

Resources