Quantcast
Channel: Questions in topic: "onmouse"
Browsing all 94 articles
Browse latest View live

OnMouseOver with multiple colliders

I have an object with 2 children : Radius and MouseDetect. They are both sphere colliders. MouseDetect is smaller than radius, and I need to detect whether the mouse is over MouseDetect. OnMouseOver...

View Article



Texture2d Change Texture by MouseClick

Hey,I want to create my own buttons, but it doesn't work.I have 2 pictures which are nearly the same, exept the "darkness".So I made a GUITexture and I dragged the first one(the lighter one) on it,...

View Article

Please help with beginner Prefab & OnMouseDown

Hello, I am working on a card game for the web. I have four prefabs for the backs of the cards: blue, red, yellow, green. Right now I can push play and the script instantiates a blue card, but I can't...

View Article

Animation plays just once "OnMouseEnter"

Hey Guys.I have a locker and, when I go on MouseEnter the door of the locker opens and when i go out of the Collider the door closes, but if I try it again it doesn't play anythingI got this Script var...

View Article

Trying to program a world globe that...

When you mouse over a particular country it'll highlight that region. I have a sphere right now with a world map texture on it that is mapped correctly. However I'm not sure how to start with...

View Article


OnMouseOver function

I am trying to get a price displayed next to the cursor when it is over a game object which can be purchased. Also would be handy if I could have a green colour if it can be bought and a red colour if...

View Article

Unknown Identifier for OnMouseUp

Im trying to make it so when i click an object in my game it takes me to my other world. heres there script im using now. im am very new to scripting and i wouldnt be suprised if i did this wrong. Its...

View Article

Game object pickup using mouse click

How can I pick up a game object like a key that is hanging on a wall using a mouse click?Maybe I should be using a raycast for this or something? I've been hunting all over hells half acre to try and...

View Article


Would OnMouseDown() and OnMouseUp() cause any problems with my game?

Like the title says, can I put both events into a script and have them load the same scene? I have been having issues where it doesnt seem to be detecting just one very well. I will end up clicking...

View Article


Drag RigidBody Script with NO Springing

I've tried all sorts of numbers in the DragRigidbody script variables, but I'm just banging my head on this one (sorry if it's silly). I want to pick up and drag an object, but without any "spring" or...

View Article

OnMouseEnter not working

I don't understand why this isn't working, I've a cube on the scene with a simple collider, in the OnMouseEnter a simple print("hello") for testing, but when I move the mouse over the 3d object the...

View Article

OnMouse event problem

[link text][1]Hi Im having a few problems with all OnMouse events. Im working on a vehicule simulator and basically all OnMouseOver events work fine until the platform the first person controller is...

View Article

Increase mouseclick area size for OnMouseDown() - For Mouse Shooting Game...

I am making a shooting game where the mouse acts as the crosshair and the targets use OnMouseDown() to know when they are hit. My problem is that I do not want the mouse to click only at one pixel...

View Article


Alternative to OnMouseDown()

I am making a shooting game where the mouse moves the aiming crosshair and the targets are using OnMouseDown() to detect when they are hit. I coded the crosshair movement for joysticks but of course...

View Article

How can I call OnMouse functions on a specific collider?

Hello, A crazy idea/question that I've came up with past midnight incoming! I was wondering if it was possible to call OnMouseEnter and similar functions on different colliders/gameObjects? Example:...

View Article


Raycast not working ?

Hello there ! I'm having a problem with Raycasting. I'm using NGUI and I'm trying to implement some universal OnMouse(Enter/Exit/...)-like callback, but no matter what I try, I can't get it working....

View Article

freeze position on click

I need help making my trampolines freeze after i click a cube. how my game works is theres two portals the start and end portal and your goal is to bounce a ball from one portal (the start portal) to...

View Article


Ignoring Layer for OnMouseEnter/OnMouseExit

Hello, i am using a Script built around OnMouseEnter/OnMouseExit on each Cube of a large Grid. On some of these cubes there are objects with colliders. Now the OnMouseEnter/OnMouseExit functions on the...

View Article

Can one click trigger 2 colliders?

I want onmousedown to be triggered on an 2 colliders, one on a parent object that encompasses the collider on the child. is this possible?

View Article

Input.MousePosition creating weird Z axis object translation

Hello All! I have been messing around with getting an object to follow my mouse position on mouse down. I have this working alongside input.touch as well, but for the sake for debugging, I would like...

View Article
Browsing all 94 articles
Browse latest View live




Latest Images