I'm making a 2D platformer and we did all the movement tweaking in a sample scene, so we figured we could make a prefab of the player and just drag it into each other scene when we're designing the levels. But for some reason, the prefab jumps significantly higher than the original and I can't figure out why. As far as I can tell, prefabs should always be an exact duplicate right?
I know public references are easily messed up when using them in a prefab. Have you tried looking through them if you have any? Also anything you set in a serialized field but not in the script itself might have changed as well.
Related
Im trying to make a simple cloud jumping game with Unity 2D and have faced a problem.
How would i make the player go "through"/"in front of" the cloud when coming under but colliding when coming down again. Or do i need to trigger the jump action somehow when "touching" the cloud without collision?
Thank you in advance. I hope my text was understandable.
I have tried many ways, i don't even know what anymore. Like with ontrigger but idk did i do it right, it didn't work, something with adding a new layer, and polygon collider but how do i even edit it clearly?
I need help :')
Currently I'm working on a 2D game with destructible terrain in unity. It works great! Except for one thing.... collision generation... Since the terrain is destructible, I have to generate collisions on the go. I tried and it's awful performance. From 1000 fps from editing the terrain to 1 fps when I enable collisions generation. This is a huge issue and I know it's possible within unity because this guy :
https://forum.unity.com/threads/wip-nimbatus.221798/
created it with collisions as well. I tried contacting him but no response yet! Any of you guys have any ides on what I can do? Thanks!
I found a rather annoying but working solution to the issue. So basically what was wrong was I was setting points as vertices. The guy I messaged told me that at the time when he made his game, the 2D engine wasn't a thing in unity so he was forced to use regular 3D components. I didn't want to do this because it would possibly limit what I can do with 2D packages since I am not using the 2D engine. But in the end I decided that unless I could find a extremely fast edge finding algorithm that supported concave meshes WITH holes, I would need to just use the regular Unity3D MeshCollider component. I'm not sure why I was having an issue with the Polygon collider as I thought it would work the same as the MeshCollider but in 2D. I think the issue was I was setting the path of the Polygon Collider as each vertice. This is wrong because I think I would need to set the edge vertices only. (My mesh does not share vertices so I'm not sure how to find the edges) Of course I could re write it to share vertices but I think I will be find with the 3D components (For now at least)
I have some Problems with the Object Manipulation Example Scene, using Unity 2018.3.1 and ARCore 1.7.0.:
In general the Scene works, but I can only manipulate the last placed Object, no previously placed Objects.
Apart from that, I cant translate/move Objects in the x/z area, only the height (y-Axis) can be changed. I cant find any reasons inside the scripts why those things don't work.
Did anyone else experience similar Problems or knows some solutions?
I have implemented basic player interactions, look, move, grab and move items and it all works fine.
The OVRGrabbable script (part of OVR plugin) makes the grabbed object`s rigidbody kinematic.
As a result, the object in hand is passing through other colliders. When the item is released everything works great but while in hand it passes through all colliders. It does not stop when it hits other colliders resulting passing with the object through a wall and etc.
I know that the OVRGrabbable script makes the object kinematic and that is why this happens. Can I do something to change this default behavior ? I need the object to stop when it hits the table, wall, not to pass through it.
Did anyone tried to solve this? Any advice ?
Thank you.
I have abandoned using the official Oculus SDK. Instead I have implemented VRTK SDK which is working great, and it supports a wider range of VR devices.
If anybody has a similar problem, VRTK solves this problem with colliders and other minor fixes.
https://github.com/thestonefox/VRTK
At the moment I've set up a dual camera scene in Unity. I've created an empty game object for my camera's to inherit from and attached some of the first person controller scripts to this empty game object.
When I run the program in the editor, it runs fine. When I build the project, the game crashes and my camera objects fall through the ground. I've never experienced something like this before in Unity. Attached is a copy of my my current fps set up values.
In the picture, you will see that I have turned gravity off (set it to 0), yet it still falls down when I run the built program.
Has anyone ever come across something like this before? I've spent all day trying to fix this, but I'm getting no where.
I experienced such an issue when my parent object (I usually use capsules to "carry" the camera as the players head like 1.70m above the ground) is set to low ... what happens if you move your camera-guy together with the game object one meter upwards? (so that he falls down a bit against the surface when you start).
Maybe there is a difference in some relations between editor-build and release-build.
Or, in case this isn't the solution, check the spatial positions of your involved objects again. Falling through a terrain is often produced by misplaced reference objects. (I sometimes hung a carrier object under a camera instead of hanging the camera under a carrier object.)
As you say that it works in the editor-build i assume that you have activated collision for the relevant objects.