Unity, shadows in 2D realm - unity3d

I'm making a 2D-game with Unity, but i'm making it in 3D-environment because 2D-environment doesn't support NavMesh. Now i noticed that 3D-environment doesn't support the new 2D-lights which i would love to use for the game. Is there any way to use the 2D-lights in 3D-environment? Or what would be the best way to make the 2D game use the lights and cast shadows in 3d-environment?
Thx.
I could just convert it to 3D, forget the NavMesh and control the character with keyboard, in that way i could use the 2D-lights, BUT i would love to have the NavMesh and baking attached to it, because the game's a clicker, and the character is more fun to move with a mouse.

Related

Unity 2D : collision with light

I was trying to make a game where when you touch a light you cant pass through it or you get damaged so what i really wanted to do was using hard light or creating something like hard light for a platfromer game.
I think I understand what you mean, what you can try to do is to use a cube or any other object with collider and with specific shader. If you have 2D game I recommend you to watch this video or learn more about shadergraph For damage you can use the simple health script and OnTriggerEnter function to reduce health.

using unity physics with SteamVR

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

Will a raycast or collider detect an unrendered mesh in Unity3D?

I have a 3d object (a capsule) that I'm using in lieu of a character model because the project is going to be from a first person perspective. You can choose in the inspector whether to render the object's mesh or not. Since this object is meant to be invisible and only a hitbox, I want to know if raycasts and colliders will still detect it. I'm assuming yes because the object seems to behave normally with the physics, but I want to avoid complications in the future.
The only thing that matters for physics is the colliders and rigidbodies, It doesn't care about meshrenderers

scripted camera movement in cinema 4d to unity3d?

I have a scene in cinema 4d, with a camera that moves through the scene. I was hoping that I could just import the entire cinema4d file into unity3d and I could just magically press play, and the scene would just.. work--camera movement and all.
Well, maybe life is not that easy. Is it even possible to import a camera from cinema into unity?
It would be nice not to have to re-program the camera in unity.
Do I have any options?
The answer is no, there is no "concept of" a camera path you can import to Unity. There is nothing whatsoever like that. (Don't forget, it's a game engine - not an animation or "filmmaking" system really.)
Fortunately this is a relatively common problem.
The solution is just that you put "any old thing" (say, a white cube) there and import that animation. Then in Unity it's trivial to just child the camera to that "marker".
You can google many examples,
http://answers.unity3d.com/answers/20413/view.html
try googling say "import camera move to Unity3d"
BTW I'm sure you're aware of this .. "Unity does not import Point Level Animations (PLA) at the moment. Use Bone-based animations instead." Doco
Another more hackish workaround;
I have once made a scene in Cinema4D which I wanted to use in Unity3d. I ended up employing MOCCA to export the camera's positions and rotation-values on it's keyframes and ended up using coding on the Unity end of things to animate the camera, based on an xml-file.
However, not having used Cinema4D in a bit; I can't remember for sure if MOCCA is still available? If memory serves me right it got replaced with something...

Unity3d; Skybox on mesh like in Source engine.

In older games Ive made levels in, like unreal or half-life the skybox is a parallaxed texture that you assign to world geometry, for instance, the ceiling of your room, to give the illusion of the room being open to the sky.
There are some neat tricks or weird things you can achieve with this 'sky portal' method. For example you could have 'sky' in an underground room. or walk through a hole in the sky.
I'm wondering is it possible to make a mesh in unity3d render as part of the skybox like in these older engines.
You can do this yes. Usually you assign a "SkyBox" to your camera and change the "Clear Flags" for her "SkyBox". However, there are other ways to do.
Learn more here: http://docs.unity3d.com/Documentation/Components/class-Skybox.html
Hope this help !