I am new to UE4 game development, but I am try to achieve something simple, but not sure what the right method is.
I have multiple meshes in my level, each mesh is a different shape. I want to add an onClick event to each mesh that populates a variable indicating which shape was clicked.
The blueprint that handles the on click will be the same for each mesh. I know I can create a blueprint and add a mesh to it, but how can I create a "generic" blueprint and add it to any of my meshes?
TIA for any suggestions.
I solved this problem by creating a Blueprint Actor Component that I could attach to each of my shapes (static meshes), and I handled the onClick event with the following nodes:
Related
One object should be transparent only behind another object.
What shaders should I put to them?
I am facing some issues using LeanTouch asset.
Context:
I am creating a Human Anatomy application using Unity3D and Vuforia. My task here is to enable user to select, drag, move human skeleton and different organs to inspect them. I was able to achieve this as long as my GameObject does not have any parent.
For example, I have a Heart 3D model having 3 child gameobjects. If i use leantouch's selectable and other drag translate. It works with no issues. But as soon as i apply the same components to the parent Heart Object. It does not work.
If you want to try it out. Create 2 or 3 3D cube objects in unity. Then create an empty gameobject and place 3d cubes into it. Now try to add lean touch components to the parent gameobject. It won't work.
Thanks
I want to create a mesh in Unity o using OpenGL using an alpha mask, like the simple one I show below. So I can hide part of virtual object that will be behind the mesh.
Is it possible? Is there any easier method to hide part of a virtual object?
“Stencil testing” is what you want. Look up how to do it in whatever game engine / graphics API you are using.
I'm new to unity and i'm trying to make an AR app, animal card game.
I have one scene/one AR camera (i'm not sure if it would be better to have one scene per animal) , I have one UI button that pop up when an image target is detected and I want to make more, one for each animal but my problem is that I can only put the buttons in one place in the canvas.
I would like to know if there is somewhere an option to make my object invisible just in the editor ?
thank you.
There's two ways in which you can hide objects in the editor - its either using Layers (you can set layer visibility in the editor and distribute objects among layers.
The alternative is to use gameobject's HideFlags but its realtively more complex (and easy to lost objects in the scene).
If you want to hide objects in the gameplay, theres two ways - you either disable the whole gameobject (using gameObject.SetActive), or you disable its rendering component (using GetComponent + enabled variable. Third way exists for UI objects - that's using CanvasGroup component
I am beginner in Unity3d. i would like to ask you about creating new gameobject from exsiting objects in unity3d.
I want to to create new gameobject from existing spheres and squares in unity3d. Right now, i only drag them to become a group. In addition, I want spheres and squares in the new gameobject not to effect collider together.
The new object only collide with other outside objects. How i can do it?
More a question, i would like to create a hoop object in Unity3D, Has already hoop object existed in Unity3D? It has not existed yet, please tell me how to create it? and the space is at middle of hoop not to effect collider ??? Thanks so much,
If my question is not easy to understand, i will edit.
Sounds like you're after a Prefab.
Once you've created your prefab, you might want to Instantiate it.
To avoid collisions, make sure your prefab does not have a Collider component. Simply remove the component inside the prefab.
A hoop shape is also known as a taurus or a donut. This isn't available as a primitive in Unity3D but it is very easily created in 3D modelling programs and used within Unity3D's mesh import.
As Nathan pointed out, create a prefab from your objects.
It looks like you want your objects to act like a compound collider (see Compound Colliders section here). You need your objects to have Collider components, and you need to add RigidBody component to their parent GameObject.
About torus collider: http://forum.unity3d.com/threads/27906-Adding-a-new-collider-primitive