I want to create AR of these lines. A room acoustic simulation.
I'm really noobie to unity as well as AR stuff so I tried to create these line using Line Renderer first.
Here is what I have done on unity3D
I haven't use script yet because I have completely no idea how to do it.
So when I tried this on the camera, only the cube was shown, no sign of these lines appearing at all. Anyone have any idea about how to solve this? Thank you.
Update: My LineRenderer setting.
This is all the same for each line renderer, the differences are just the number on x,y and z.
Try unchecking the "use world space" option and place it manually in the environment.
Related
I am trying to create a bit of a game where 3d house objects are used.
Also there are some 3d cubes to show the specific points in the house.
I would like to draw dot lines between these 3d cubes so that I can instruct users where to go next kind of things.
I achieved to draw a line in between but not dot lines like the photo attached.
I googled but found nothing...
Does anyone know how to achieve that?
Thank you.
Solved with help from Kalender.
Go to the unity forum and download the texture unity_31130666 attaches and apply it to LineRenderer with a bit of adjustment of shader.
It all worked.
I'm working on a procedural world generation in Unity 2D. But when It spawns my blocks, blocks cover each other. What could be the possible problem? How can I fix it?
Thanks for your help.
Screenshot:
screenshot
It might be because you made the boxcollider2D on your blocks a little too small.
Try to fit the collider perfectly with the edges of the block
Okay, finally managed to solve it. For future people, here's the solution:
So when you export your sprite from Photoshop or whatever program you use, you export it with a preferred size (ex. 128×128 px).
What you need to do is, go ahead and click your .png file in Unity. In the inspector window, you will see an option called "Pixels Per Unit". You have to enter the correct sprite size there.
Apply the changes, and there you go!
I'm trying to use a line renderer to act like a grappling cable for a vehicle of mine in my game. It seems, however, from the camera view the line is only visible up to a certain distance far away. Is there anything I can do to make the camera see more of the line?
EDIT: I should clarify, I know how to extend the length of the line, I have that script written. What I'm saying is that the line is hard to see from the camera when looking from behind. I want to give the player a good idea of how far the hook is going, even when it's over 30 units away on the forward z axis?
FURTHER:
When I turn my car to the side while moving with the line extended a distance, I can see much more of the line since I start to see the line from the side???
line renderer is a line between two points.
you just need to adjust the values under 'Positions'.
you can also click on the three dot icon at the top to 'edit points in scene view' and drag the further point outward, you can also add points with the plus icon beside it.
you could also use raycast for your grappling hook
I'm not super experienced with unity's linerenderer. However it looks like the linerenderer stops at your pink light barrier. I'm not sure if the linerenderer works like a raycast however.
EDIT:
Ok. Now I get what you want to achive. My guess is that unity does not render the line because it becomes smaller than a pixel and the lineRenderer is not a 3D element. I had some succes by using a different curve. Try to increase the width of the line the further away it is.
Ok, so I have looked around the internet but I cannot find the sprite mesh. I should be able to right click my sprite> 2D Object> SpriteMesh.
Problem is that I don't see the option "SpriteMesh" anywhere.
Here's the deal. I created a bunch of 2D pieces for a character: head, body, two arms, two legs, two hands, and two feet. I imported the sprite as a PNG file and changed SpriteMode to multiple. I used the Sprite Editor to slice the char into pieces automatically. There's also nothing inside of the sprite editor that allows me to rig bones either.
Now I need to Rig the toon with bones and skin. However, I cannot find a way to do this. Watching a few tutorials, the guy adds a SpriteMesh to each of the parts. However, when I try to do this, the option just doesn't exist. I see SpriteMask but no SpriteMesh.
I'm using Unity 2018.2.18f1.
I have zero experience in animations like this. Normally I create a player/enemy without legs/arms. So they just float and I use the animation tab to change size/shape to insinuate movement. However, I'd like to take this next step and make the game look better.
How can I rig my toon? What steps do I need to follow?
All help is appreciated!
I guess you want to use the new 2D Features from Unity, if you want to rig your 2D Character.
I'm using Unity 2018.2.18f1.
You need to use Unity 2018.3 or later to use these tools.
I suggest you to use Unity Hub to download multiples versions and Beta versions.
There is a really nice video from Brackeys about this subject also.
When you have the 2018.3 or later version installed, open your project and go to the Window/Package Manager window, you need to install these packages :
I don't think you need the 2D Pixel Perfect but it's always nice to have.
I'm looking for a solution to draw Unity3D trails (using Trail Renderer) when moving the object with Vuforia marker.
Let's say I have a box on top of the marker and whenever I move my marker I'd like my box's trail to follow the object (curved line). So far, my trail is a straight line, most probably because trail attached to the box object calculates object's local coordinate system.
Any ideas how to solve this? If this isn't doable with Vuforia+Unity, any ideas where to search for a better combination?
Thanks a lot!
The thing is that in Vuforia the GameObjects attached to the markers are not moving at all, instead of that, is the camera who's moving arround the GameObject.
Start checking that, probably it's the reason why you are not getting the trails working properly.
Thanks a lot Vancete. You were right. I should change World Center Mode from "First Target" to "Specific Target"