Game Development Community

Drag camera control

by Jon Law · in Torque Game Engine · 04/17/2006 (9:21 pm) · 2 replies

I am trying to edit the advanced camera in orbit mode so that it only orbits when a mouse button is held down. However i can't seem to figure out the onmousedragged() function or how to integrate it with a keybinding. Anyways if anyone has a solution to this please, it would be most helpful. thanks!

#1
04/18/2006 (3:12 am)
You could set a variable when the mouse button is pressed then only move the camera when that variable is set. Gets around using the onMouseDragged() function :)
#2
04/18/2006 (8:35 am)
Thanks but i still not sure now to use the onMouseDragged function. every example ive seen has somthing like

guislider::onMouseDragged()
{
do this.....
};

what do i attach it to if i just want to check it its dragged anywhere.... Also where do i set the variable. should i set it in default binds or somewhere else.

thanks again