Search found 3 matches

by vrg84
Wed Dec 10, 2008 2:10 pm
Forum: Beginners Help
Topic: Restrict mouse to center + Player movement with mouse
Replies: 2
Views: 413

rogerborg wrote:Calculate the amount of movement by always diffing each mouse position from the screen centre, not the last mouse position.

I'll leave the "why" as an exercise for the reader.
Ah! Fixed it, thanks :)

Kind of logical when i read it now :oops:
by vrg84
Wed Dec 10, 2008 1:15 pm
Forum: Beginners Help
Topic: addButton problem.
Replies: 6
Views: 503

Do you have an event receiver for the buttons?

If i look at the tutorial @ http://irrlicht.sourceforge.net/tut005.html

You should have something like this:

class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(const SEvent& event)
{
if (event.EventType == EET_GUI_EVENT ...
by vrg84
Wed Dec 10, 2008 12:36 pm
Forum: Beginners Help
Topic: Restrict mouse to center + Player movement with mouse
Replies: 2
Views: 413

Restrict mouse to center + Player movement with mouse

Good afternoon all,

Maybe my topic title is a big vague, so i'll try to explain what i am trying to achieve.

In my game, i want to let the Player move with the mouse (not a regular one, its a trackball).

- Drag mouse up/down = Move in Z-axis
- Drag mouse left/right = Move in X-axis

In addition ...