Questions tagged [callbacks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Clicking UI button calls event twice

I've designed a game where, when a button is clicked, the moving point stops. If the button is clicked again, the moving point starts moving again. I only click on the button once, but the ...
Alisa's user avatar
  • 1
0 votes
1 answer

How to access GameObject inside Action

I'm stuck inside an Action : ...
Maifee Ul Asad's user avatar
1 vote
1 answer

Unity InputSystem using Unity Events not maintaining values

I am testing out using the new Input System and cannot get the values from context.ReadValue<Vector2>() to pass into a private variable. The simple setup is ...
anothershrubery's user avatar
0 votes
1 answer

Unity3D: Download multiple files and implement a callback

MrRobot9's user avatar
  • 321
1 vote
0 answers

Get return of asynchronous callback since module export- Nodejs

Server: require('./MovimientoJugador')(); var camino4=MoverJugador(startX,startY,endX,endY,mapa2); console.log("Camino: " + camino4); MovimientoJugador: ...
Albert's user avatar
  • 41
4 votes
1 answer

In GLUT, how do I bind an action to a press of "any key"?

Well, this sound ridiculous but the logic is escaping me. I have drawn my cube in OpenGL and I want to translate it to the right if any of the key on the keyboard is pressed. I know how to do this for ...
CN1002's user avatar
  • 179
0 votes
1 answer

Handling input with callback functions

I'm not sure if I understand callback functions completely - they are functions that another function calls? This seems like a powerful tool, especially w/r/t handling input. I've written up this ...
Daniel Martin's user avatar
2 votes
1 answer

Is OnMouseUp()'s behavior intended?

Version: Unity3D 4.6.2f1 I have a grid of tiles (Cube GameObjects with a Tile script attached). They are positioned at their ...
Varaquilex's user avatar
0 votes
1 answer

Collision response callback

First at all, I'm not asking how to handle or detect collision. I already have that. My actual situation is, I have a system collision and I detect the collisions. Every collision detected is store ...
Dorian Hawkmoon's user avatar
4 votes
3 answers

Callback on Derived Class?

How does Unity3D implement their system where if a class is derived from MonoBehaviour and has certain methods like Awake() or Update(), they are called accordingly? I want to do a similar system for ...
JPtheK9's user avatar
  • 2,031
5 votes
2 answers

How do I create a message box that fires a callback on button press?

I need to create a message box with an "OK"-button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.
Thushar G R's user avatar
1 vote
1 answer

How do I handle collision response between many different types of game objects?

I am looking for a way to avoid the dreaded switch or if/else scenarios between numerous game object types when a collision takes place in a game. For example: You have a list of game objects which ...
Red's user avatar
  • 13
-1 votes
1 answer

Overload C++ functions in lua [closed]

I have had a look around but I believe this to be impossible due to compile time of c++. However is it possible to have a class registered in lua and c++ that has a overload update function which I ...
Dekowta's user avatar
  • 45
1 vote
3 answers

Handling multiple pressed keys with KeyListeners

I'm making a game Applet with Java that uses KeyListeners to control a paddle (for a game like Breakout/Pong). My basic implementation goes like this: ...
kikiotsuka's user avatar
0 votes
1 answer

Make a callback to android methods from libgdx

How can I make a callback from libgdx to an Android method? I want to use the method to overwrite a file in the internal memory.
Rudy_TM's user avatar
  • 1,412
4 votes
1 answer

How do I run a callback when all objects have stopped moving?

I'm using Bullet and want to take some action once all objects in a dynamic world have reached 0 velocity (or at least a value that's very close). I was trying to iterate over all of them all the ...
sebap123's user avatar
  • 285
1 vote
1 answer

How can I cancel a contact in a b2ContactListener?

To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin ...
meds's user avatar
  • 1,480